PageSourceSearch

https://tilnote.io/_next/static/chunks/6564-4f812ef3a307fa8c.js

js tilnote.io collected 2026-09-24 09:36:38 UTC 21,071 bytes, 6 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6564],{55779:(e,t,a)=>{"use strict";a.d(t,{A:()=>c});var s=a(37876),r=a(14232),i=a(36438),l=a(89099),o=a(847),n=a(71974);let d=new Set(["ko","en","ja"]),c=({book:e,closeBookModal:t,mode:a})=>{let c,{t:m}=(0,o.Bd)("common"),p=e||{},u=(0,l.useRouter)(),[x,h]=(0,r.useState)(p.title||""),[g,b]=(0,r.useState)(p.content?p.content:""),f=p.price&&![0,1e3,3e3,5e3,1e4,15e3,2e4,3e4,5e4,99e3].includes(p.price),[y,k]=(0,r.useState)(f?0:p.price||0),[j,v]=(0,r.useState)(f),[N,_]=(0,r.useState)(p.price||0),[w,C]=(0,r.useState)([]),[M,S]=(0,r.useState)([]),[B,P]=(0,r.useState)(null),[A,L]=(0,r.useState)(null),[E,$]=(0,r.useState)(p.type||"text"),[F,R]=(0,r.useState)(p.workspaceMode||"default"),[V]=(0,r.useState)(p.workspaceLanguage||(c=String(u.locale||"").trim().toLowerCase().split(/[-_]/)[0],d.has(c)?c:"ko")),[D,T]=(0,r.useState)("prime"===p.type),[I,W]=(0,r.useState)(null),[H]=(0,r.useState)(!!p.salesDiscontinued&&p.salesDiscontinued),[z,G]=(0,r.useState)(!1),U="prime"===E,Z="llm_wiki"===F,q=!U&&!Z,X=(0,n.o)(I),J=q&&X;(0,r.useEffect)(()=>{let e=!0;return i.A.get("/memberships/check?scope=core").then(t=>{e&&W(t.data?.data?.type||"free")}).catch(()=>{e&&W("free")}),()=>{e=!1}},[]),(0,r.useEffect)(()=>{let e=!0;return"make"!==a?()=>{e=!1}:(i.A.get("/creator/features").then(t=>{if(!e)return;let a=!!t.data?.data?.lessonBookCreationEnabled;T(a),a||$("text")}).catch(()=>{e&&(T(!1),$("text"))}),()=>{e=!1})},[a]),(0,r.useEffect)(()=>{Z&&"text"!==E&&$("text")},[Z,E]);let O=async()=>{if(!x||""===x.trim())return void alert("제목을 입력해 주세요.");if(z)return;let e=new FormData;e.append("title",x),e.append("content",g),U&&!Z&&e.append("type","prime"),J&&j?e.append("price",N):J&&y&&e.append("price",y),J&&w.forEach((t,a)=>{e.append("files",t)}
1),B&&e.append("image",B),e.append("salesDiscontinued",H),e.append("workspaceMode",F);try{if(G(!0),"make"===a){let t=(await i.A.post("/books",e)).data.bookId;Z&&await i.A.post(`/books/${t}/wiki/enable`,{workspaceLanguage:V}),u.push(`/users/books/${t}`);return}if("edit"===a){let t=await i.A.put(`/books/${p._id}`,e);Z&&"llm_wiki"!==p.workspaceMode&&await i.A.post(`/books/${p._id}/wiki/enable`,{workspaceLanguage:V}),t.data.requiresReapproval&&alert(t.data.message),window.location.reload()}}catch(e){e.response?.data?.error?alert(e.response.data.error):Z&&alert("워크스페이스 책을 생성하거나 전환하는 중 오류가 발생했습니다.")}finally{G(!1)}};return(0,s.jsx)("div",{className:"fixed inset-0 z-[1000] overflow-y-auto",children:(0,s.jsxs)("div",{className:"flex min-h-screen items-center justify-center p-4 text-center sm:p-0",children:[(0,s.jsx)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",onClick:()=>t(!1)}),(0,s.jsxs)("div",{className:"relative transform overflow-hidden rounded-lg bg-white px-8 pb-8 pt-6 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-2xl",children:[(0,s.jsx)("div",{className:"absolute right-0 top-0 hidden pr-4 pt-4 sm:block",children:(0,s.jsxs)("button",{type:"button",className:"rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none",onClick:()=>t(!1),children:[(0,s.jsx)("span",{className:"sr-only",children:m("close")}),(0,s.jsx)("svg",{className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]})}),(0,s.jsx)("div",{className:"sm:flex sm:items-start",children:(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsx)("h3",{className:"text-2xl font-semibold leading-6 text-gray-900 mb-8",children:"make"===a?"새 책 만들기":"책 수정하기"}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"책 제목"}),(0,s.jsx)("input",{type:"text",name:"name",id:"name","data-testid":"book-modal-title-input",value:x,onChange:e=>h(e.target.value),className:"p-2 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm",placeholder:"책 제목을 입력하세요"})]}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"책 모드"}),"llm_wiki"===p.workspaceMode?(0,s.jsx)("div",{className:"rounded-lg border border-sky-200 bg-sky-50 px-4 py-3 text-sm text-sky-900",children:"기존 Wiki Workspace는 읽기 전용으로 보관됩니다."}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3",children:(0,s.jsxs)("button",{type:"button",onClick:()=>R("default"),className:`rounded-lg border px-4 py-3 text-left transition-colors ${!Z?"border-indigo-500 bg-indigo-50 text-indigo-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"}`,children:[(0,s.jsx)("div",{className:"font-medium",children:"일반 책"}),(0,s.jsx)("div",{className:"mt-1 text-sm text-gray-500",children:"페이지 트리와 공개/판매 흐름을 사용하는 기본 책입니다."})]})})]}),Z?(0,s.jsx)("div",{className:"mb-6 rounded-lg border border-sky-200 bg-sky-50 px-4 py-3 text-sm text-sky-900",children:"워크스페이스 책은 생성 후 바로 Wiki Workspace로 전환되며, 일반 공개/판매 책 흐름과 분리됩니다."}):null,(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("label",{htmlFor:"content",className:"block text-sm font-medium text-gray-700 mb-2",children:"책 설명"}),(0,s.jsx)("textarea",{name:"content",id:"content","data-testid":"book-modal-content-input",value:g,onChange:e=>b(e.target.value),rows:4,className:"p-2 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm",placeholder:"책에 대한 설명을 입력하세요"})]}),!Z&&(D||"prime"===p.type)&&(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"책 유형"}),"make"===a?(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>$("text"),className:`rounded-lg border px-4 py-3 text-left transition-colors ${!U?"border-indigo-500 bg-indigo-50 text-indigo-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"}`,children:[(0,s.jsx)("div",{className:"font-medium",children:"일반 책"}),(0,s.jsx)("div",{className:"mt-1 text-sm text-gray-500",children:"무료 또는 구매형 책으로 만듭니다."})]}),(0,s.jsxs)("button",{type:"button",onClick:()=>$("prime"),className:`rounded-lg border px-4 py-3 text-left transition-colors ${U?"border-orange-500 bg-orange-50 text-orange-700":"border-gray-300 bg-white text-gray-700 hover:border-gray-400"}`,children:[(0,s.jsx)("div",{className:"font-medium",children:"레슨 책"}),(0,s.jsx)("div",{className:"mt-1 text-sm text-gray-500",children:"멤버십 레슨 흐름으로 공개됩니다."})]})]}):(0,s.jsx)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 px-4 py-3 text-sm text-gray-700",children:U?"레슨 책":"일반 책"})]}),U?(0,s.jsx)("div",{className:"mb-6 rounded-lg border border-orange-200 bg-orange-50 px-4 py-3 text-sm text-orange-800",children:"레슨 책은 가격 대신 멤버십 레슨 흐름으로 제공됩니다."}):J?(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsxs)("label",{htmlFor:"price",className:"block text-sm font-medium text-gray-700 mb-2",children:["가격","edit"===a&&p.confirmed&&(0,s.jsx)("span",{className:"text-gray-500 text-sm ml-2",children:"(승인된 책의 가격 변경은 관리자
1에게 문의해 주세요.)"})]}),"edit"===a&&p.confirmed?(0,s.jsx)("div",{className:"p-2 block w-full rounded-md border border-gray-300 bg-gray-50 text-sm text-gray-700",children:p.price?`${p.price.toLocaleString()}원`:"무료"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("select",{id:"price",name:"price",value:j?"custom":y,onChange:e=>{"custom"===e.target.value?(v(!0),k(0)):(v(!1),k(e.target.value),_(0))},className:"p-2 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm",children:[(0,s.jsx)("option",{value:"0",children:"무료"}),(0,s.jsx)("option",{value:"1000",children:"1,000원"}),(0,s.jsx)("option",{value:"3000",children:"3,000원"}),(0,s.jsx)("option",{value:"5000",children:"5,000원"}),(0,s.jsx)("option",{value:"10000",children:"10,000원"}),(0,s.jsx)("option",{value:"15000",children:"15,000원"}),(0,s.jsx)("option",{value:"20000",children:"20,000원"}),(0,s.jsx)("option",{value:"30000",children:"30,000원"}),(0,s.jsx)("option",{value:"50000",children:"50,000원"}),(0,s.jsx)("option",{value:"99000",children:"99,000원"}),(0,s.jsx)("option",{value:"custom",children:"직접 입력"})]}),j&&(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{type:"number",id:"customPrice",name:"customPrice",value:N,onChange:e=>{let t=e.target.value;""===t?_(""):_(parseInt(t)||0)},onBlur:e=>{let t=e.target.value;""===t?_(0):_(100*Math.round((parseInt(t)||0)/100))},min:"100",max:"99000",step:"100",className:"p-2 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm pr-12",placeholder:"가격을 입력하세요"}),(0,s.jsx)("div",{className:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none",children:(0,s.jsx)("span",{className:"text-gray-500 sm:text-sm",children:"원"})})]}),(0,s.jsx)("p",{className:"mt-1 text-sm text-gray-500",children:"100원 단위로 입력 가능 (최소 100원, 최대 99,000원)"})]})]})]}):q&&null!==I?(0,s.jsx)("div",{className:"mb-6 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-900",children:n.B}):null,(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"책 표지 이미지"}),A?(0,s.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2 border border-gray-300 rounded-md bg-gray-50",children:[(0,s.jsx)("img",{src:A,alt:"Preview",className:"h-8 w-8 object-cover rounded flex-shrink-0"}),(0,s.jsx)("span",{className:"text-sm text-gray-700 flex-1",children:"이미지 선택됨"}),(0,s.jsx)("button",{type:"button",onClick:()=>{L(null),P(null)},className:"text-sm text-red-600 hover:text-red-500",children:"삭제"})]}):(0,s.jsx)("label",{htmlFor:"image-input",className:"block cursor-pointer",children:(0,s.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2 border border-dashed border-gray-300 rounded-md hover:border-gray-400 transition-colors",children:[(0,s.jsx)("svg",{className:"h-5 w-5 text-gray-400 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),(0,s.jsx)("span",{className:"text-sm text-gray-500 flex-1",children:"PNG, JPG, GIF, WEBP, AVIF (최대 50MB)"}),(0,s.jsx)("span",{className:"text-sm font-medium text-indigo-600",children:"업로드"}),(0,s.jsx)("input",{id:"image-input",name:"image",type:"file",className:"sr-only",onChange:e=>{let t=e.target.files[0];t&&(P(t),L(URL.createObjectURL(t)))},accept:"image/jpeg,image/jpg,image/png,image/gif,image/webp,image/avif"})]})})]}),J&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-3",children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"판매할 파일"}),(0,s.jsx)("label",{htmlFor:"file-input",className:"block cursor-pointer",children:(0,s.jsxs)("div",{className:"flex items-center gap-3 px-3 py-2 border border-dashed border-gray-300 rounded-md hover:border-gray-400 transition-colors",children:[(0,s.jsx)("svg",{className:"h-5 w-5 text-gray-400 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,s.jsx)("span",{className:"text-sm text-gray-500 flex-1",children:"PDF, ZIP (최대 50MB)"}),(0,s.jsx)("span",{className:"text-sm font-medium text-indigo-600",children:"업로드"}
1),(0,s.jsx)("input",{id:"file-input",name:"files",type:"file",className:"sr-only",onChange:e=>{let t=Array.from(e.target.files);if(t.length>0){let e=["application/pdf","application/zip","application/x-zip-compressed"];if(t.filter(t=>!e.includes(t.type)).length>0)return void alert("지원하지 않는 파일 형식이 포함되어 있습니다.");C(e=>[...e,...t]),S(e=>[...e,...t.map(e=>e.name)])}},accept:".pdf,.zip",multiple:!0})]})})]}),M.length>0&&(0,s.jsx)("div",{className:"mb-4 space-y-1",children:M.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center justify-between bg-gray-50 px-3 py-1.5 rounded text-sm",children:[(0,s.jsx)("span",{className:"text-gray-900 truncate",children:e}),(0,s.jsx)("button",{type:"button",onClick:()=>{C(e=>e.filter((e,a)=>a!==t)),S(e=>e.filter((e,a)=>a!==t))},className:"text-red-600 hover:text-red-500 ml-2",children:"삭제"})]},t))})]}),(0,s.jsxs)("div",{className:"mt-8 flex justify-end space-x-3",children:[(0,s.jsx)("button",{type:"button",onClick:()=>t(!1),className:"inline-flex justify-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:m("cancel")}),(0,s.jsx)("button",{type:"button",onClick:O,disabled:z,"data-testid":"book-modal-submit",className:"inline-flex justify-center rounded-md border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:z?"처리중...":"make"===a?"만들기":"수정하기"})]})]})})]})]})})}},74701:e=>{e.exports={overlay:"BookPublishModal_overlay__iQMGN",modal:"BookPublishModal_modal__Y5ESq",container:"BookPublishModal_container__jqsyC",header:"BookPublishModal_header__QVcmV",title:"BookPublishModal_title__9_cVl",lead:"BookPublishModal_lead__aVNF1",description:"BookPublishModal_description__i1EBk",pageCard:"BookPublishModal_pageCard__BP5A4",pageCardHeader:"BookPublishModal_pageCardHeader__bsBUv",pageCardTitle:"BookPublishModal_pageCardTitle__UXU4B",pageList:"BookPublishModal_pageList__B8dpY",emptyState:"BookPublishModal_emptyState__Zr37J",pageRow:"BookPublishModal_pageRow__7ESsH",checkbox:"BookPublishModal_checkbox__75Vgs",pageContent:"BookPublishModal_pageContent__r4mk5",pageLine:"BookPublishModal_pageLine__H77Vo",pageTitle:"BookPublishModal_pageTitle__nCAsZ",kindChip:"BookPublishModal_kindChip__O9EU3",publishState:"BookPublishModal_publishState__e8Zow",footer:"BookPublishModal_footer___Tubb"}},87782:(e,t,a)=>{"use strict";a.d(t,{A:()=>h});var s=a(37876),r=a(36438),i=a(14232),l=a(31777),o=a(46358),n=a(74701),d=a.n(n);let c=new Set(["content","overview","index","topic"]),m={content:"콘텐츠 페이지",overview:"메인 위키 페이지",index:"인덱스",topic:"콘텐츠 페이지"},p={overview:0,index:1,content:2,topic:2};function u(e){return String(e||"").trim().toLowerCase()}function x(e){return e?.page?._id?.toString()||""}let h=({setPublishPopup:e,item:t})=>{let[a,n]=(0,i.useState)([]),[h,g]=(0,i.useState)([]),[b,f]=(0,i.useState)({}),[y,k]=(0,i.useState)(!1),j=(0,l.wA)(),v=t?.workspaceMode==="llm_wiki",N=h.reduce((e,t)=>e+ +!!b[x(t)],0),_=h.length>0&&h.every(e=>!0===b[x(e)]);(0,i.useEffect)(()=>{if(!t?._id)return;let e=!0;return(async()=>{try{let[a,s]=await Promise.all([r.A.get(`/books/${t._id}/users`),v?r.A.get(`/books/${t._id}/wiki/pages`):Promise.resolve(null)]);if(!e)return;let i=Array.isArray(a.data?.data?.book?.nodes)?a.data.data.book.nodes:[],l=i,o=i;if(v){let e=Array.isArray(s?.data?.data?.pages)?s.data.data.pages:[],t=new Map(e.filter(e=>e?._id).map(e=>[e._id.toString(),e]));l=i.map(e=>(function e(t,a){let s=x(t),r=s?a.get(s):null;return{...t,page:r?{...t.page,...r,_id:r._id}:t.page,nodes:Array.isArray(t?.nodes)?t.nodes.map(t=>e(t,a)):[]}})(e,t));let a=new Set(l.map(e=>x(e))),r=e.filter(e=>e?._id&&!a.has(e._id.toString())).map(e=>({id:e._id.toString(),page:e,nodes:[]}));r.length>0&&(l=[...l,...r]),o=(l=[...l||[]].sort((e,t)=>{let a=u(e?.page?.wikiMeta?.kind),s=u(t?.page?.wikiMeta?.kind),r=p[a]??Number.MAX_SAFE_INTEGER,i=p[s]??Number.MAX_SAFE_INTEGER;return r!==i?r-i:0})).filter(e=>{var t;return t=e?.page?.wikiMeta?.kind,c.has(u(t))})}let d=!t?.publish,m={};
1o.forEach(e=>{let t=x(e);t&&(m[t]=!!d||!!e?.page?.publish)}),n(l),g(o),f(m)}catch{if(!e)return;j(o.setFlash({type:"error",message:"공개 가능한 페이지를 불러오지 못했습니다.",timestamp:+new Date}))}})(),()=>{e=!1}},[j,v,t?._id,t?.publish]);let w=async()=>{if(!t?._id||0===h.length)return;let s=h.map(e=>[x(e),!!b[x(e)]]);if(!s.some(([,e])=>e))return void j(o.setFlash({type:"warn",message:"최소 한 개의 페이지를 공개 대상으로 선택해주세요.",timestamp:+new Date}));k(!0);try{let i=function(e){let t=[];for(let a=0;a<e.length;a+=10)t.push(e.slice(a,a+10));return t}(s),l=new Set;for(let e of i){let t=e.map(([e,t])=>r.A.put(`/pages/publish/${e}`,{publish:t,skipPopularRecalc:!0}).catch(t=>{if(t.response?.status===404)return l.add(e),null;throw t}));await Promise.all(t)}let o=new Map(s),n=function e(t,a){return(t||[]).reduce((t,s)=>{let r=x(s);return r&&a.has(r)||t.push({...s,nodes:e(s?.nodes,a)}),t},[])}(a,l),d=function e(t,a){return(t||[]).map(t=>{let s=x(t),r=t?.page?{...t.page,...s&&a.has(s)?{publish:a.get(s)}:{}}:t.page;return{...t,page:r,nodes:e(t?.nodes,a)}})}(n,o);await r.A.put(`/books/${t._id}`,{nodes:d}),await r.A.put(`/books/publish/${t._id}`,{publish:!0}),e(!1),location.href=`/books/${t._id}`}catch(e){if(e.response&&429===e.response.status&&e.response.data){let t=e.response.data,a=t.error||"일일 발행 제한에 도달했습니다.";t.dailyLimit&&void 0!==t.currentCount&&(a+=`
2
3📊 오늘 발행: ${t.currentCount}/${t.dailyLimit}`),t.message&&(a+=`
4${t.message}`),t.upgradeMessage&&(a+=`
5
6💡 ${t.upgradeMessage}`),alert(a+="\n\n⏰ 내일 오전 0시 이후 다시 시도해주세요."),j(o.setFlash({type:"error",message:t.error,timestamp:+new Date}))}else e.response?.data?.error&&j(o.setFlash({type:"warn",message:e.response.data.error,timestamp:+new Date}))}finally{k(!1)}};return(0,s.jsx)("div",{className:d().overlay,onClick:()=>e(!1),children:(0,s.jsx)("div",{className:d().modal,onClick:e=>{e.stopPropagation()},role:"dialog","aria-modal":"true","aria-label":"책 공개 설정",children:(0,s.jsxs)("div",{className:d().container,children:[(0,s.jsxs)("div",{className:d().header,children:[(0,s.jsx)("h3",{className:d().title,title:t.title,children:t.title}),(0,s.jsx)("p",{className:d().lead,children:"이 책을 공개하시겠습니까?"}),(0,s.jsx)("p",{className:d().description,children:"공개된 페이지만 다른 사람에게 보입니다. 공개할 페이지를 선택하세요."}),v?(0,s.jsx)("p",{className:d().description,children:"위키 책은 메인 위키 페이지, 인덱스, 콘텐츠 페이지만 공개할 수 있습니다. 원본 소스, 소스 요약, 로그 페이지는 계속 비공개로 유지됩니다."}):t.price?(0,s.jsx)("p",{className:d().description,children:"유료 책의 경우에도 공개된 페이지만 결제한 사람에게 보입니다."}):null]}),(0,s.jsxs)("div",{className:d().pageCard,children:[(0,s.jsxs)("div",{className:d().pageCardHeader,children:[(0,s.jsx)("div",{className:d().pageCardTitle,children:"페이지 공개 설정"}),(0,s.jsx)("button",{className:"tn-btn tn-btn--secondary tn-btn--sm",onClick:()=>{let e=!_,t={};h.forEach(a=>{let s=x(a);s&&(t[s]=e)}),f(t)},disabled:0===h.length,children:_?"전체 해제":"전체 선택"})]}),(0,s.jsx)("div",{className:`${d().pageList} overflow-y-auto`,children:0===h.length?(0,s.jsx)("div",{className:d().emptyState,children:"공개 가능한 페이지가 아직 없습니다."}):h.map(e=>{let t=x(e),a=u(e?.page?.wikiMeta?.kind);return(0,s.jsx)("div",{children:(0,s.jsxs)("label",{className:d().pageRow,children:[(0,s.jsx)("input",{type:"checkbox",checked:b[t]||!1,onChange:()=>{f(e=>({...e,[t]:!e[t]}))},className:d().checkbox}),(0,s.jsx)("div",{className:d().pageContent,children:(0,s.jsxs)("div",{className:d().pageLine,children:[(0,s.jsx)("span",{className:d().pageTitle,title:e.page.title||"제목 없음",children:e.page.title||"제목 없음"}),v&&a?(0,s.jsx)("span",{className:d().kindChip,children:m[a]||a}):null,(0,s.jsx)("span",{className:d().publishState,children:e.page.publish?"(공개)":"(비공개)"})]})})]})},t)})})]}),(0,s.jsxs)("div",{className:d().footer,children:[(0,s.jsx)("button",{onClick:()=>e(!1),className:"tn-btn tn-btn--secondary",children:"닫기"}),(0,s.jsx)("button",{className:"tn-btn tn-btn--primary",onClick:w,disabled:y||0===h.length||0===N,children:y?"공개 중...":"공개하기"})]})]})})})}}}]);

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.