PageSourceSearch

https://app.ebookwriter.ai/build/assets/ResearchViewPage-8a1758d3.js

js ebookwriter.ai collected 2026-10-05 11:59:00 UTC 22,393 bytes, 9 lines download raw bytes

1import{_ as Pe,r as k,B as b,l as H,o as De,a as Ve,m as Me,b as o,e as a,g as t,d as M,w as N,f as C,n as m,h as r,F as x,t as i,q as J,u as E,s as q,v as pe,c as Y,T as Z,i as ee,E as ke}from"./_plugin-vue_export-helper-a7c7f9f8.js";import{u as Ne,e as Re,b as R}from"./main-2b3b9f70.js";import"./axios-917b1704.js";/* empty css            */const Ue={class:"page-head"},Le={key:0,class:"head-actions"},Ae={class:"ctx-wrap"},Fe=["href"],je={key:0,class:"card sk-pad"},Ie={class:"card"},Ge={class:"info-grid"},Ke={class:"info-col"},Oe={class:"info-item"},ze={class:"info-value"},He={class:"info-item"},qe={class:"info-value"},Xe={key:0,class:"info-item"},Qe={class:"info-value"},We={class:"info-item"},Je={class:"info-col"},Ye={class:"info-item"},Ze={class:"info-value"},et={class:"info-item"},tt={class:"info-value"},st={key:0,class:"card running-card"},lt={key:1,class:"card"},ot={class:"result-block"},nt={class:"result-list"},at={class:"result-block"},it={class:"result-prose"},ut={class:"result-block"},rt={class:"result-list"},dt={class:"result-block"},vt={class:"result-prose"},ct={class:"result-block"},pt={class:"result-list"},kt={class:"result-block"},bt={class:"result-list"},mt={key:2,class:"card"},gt={class:"result-block"},ht={class:"result-prose"},ft={class:"result-block"},_t={class:"result-prose"},yt={class:"result-block"},wt={class:"result-prose"},Ct={class:"result-block"},xt={class:"result-prose"},$t={class:"result-block"},Bt={class:"result-list"},Tt={key:3,class:"card table-card-pad"},Et={class:"table-head"},St={class:"card-title",style:{margin:"0"}},Pt={key:0,class:"bulk-toolbar"},Dt={class:"ctx-wrap"},Vt={key:1,class:"selected-row"},Mt={key:2,class:"table"},Nt={style:{width:"34px"}},Rt=["checked"],Ut=["value"],Lt={class:"entry-cell"},At={class:"row-actions"},Ft=["title","onClick"],jt=["fill"],It=["onClick"],Gt={key:3,class:"empty-text"},Kt={key:4,class:"table-footer"},Ot={class:"footer-info"},zt={class:"footer-right"},Ht={key:0,class:"pg-group"},qt=["disabled"],Xt={class:"pg-info"},Qt=["disabled"],Wt={class:"per-page"},Jt={key:4,class:"card table-card-pad"},Yt={key:0,class:"bulk-toolbar"},Zt={class:"ctx-wrap"},es={key:1,class:"selected-row"},ts={key:2,class:"table"},ss={style:{width:"34px"}},ls=["checked"],os=["value"],ns={class:"entry-cell"},as={class:"entry-cell"},is={class:"row-actions"},us=["title","onClick"],rs=["fill"],ds=["onClick"],vs={key:3,class:"empty-text"},cs={key:4,class:"table-footer"},ps={class:"footer-info"},ks={class:"footer-right"},bs={key:0,class:"pg-group"},ms=["disabled"],gs={class:"pg-info"},hs=["disabled"],fs={class:"per-page"},_s={class:"modal"},ys={class:"modal-header"},ws={class:"modal-body"},Cs={class:"modal-text"},xs={class:"modal-footer"},$s={class:"modal modal-lg"},Bs={class:"modal-header"},Ts={class:"modal-body modal-scroll"},Es={class:"result-block"},Ss={class:"result-prose"},Ps={class:"result-block"},Ds={class:"result-prose"},Vs={class:"result-block"},Ms={class:"result-prose"},Ns={class:"result-block"},Rs={key:0,class:"result-list result-ol"},Us={key:1,class:"result-prose"},Ls={class:"modal-footer"},As={class:"modal modal-sm"},Fs={class:"modal-header"},js={class:"modal-footer"},Is=["disabled"],Gs={__name:"ResearchViewPage",props:{id:{type:[String,Number],required:!0}},setup(be){const g=be,te=Ne(),w=Re(),X=k(!0),n=k(null),S=k(!1),h=k(null),P=k(null),f=k(null),v=k([]),c=k([]),$=k(null),U=k(!1),_=k(1),B=k(10),y=k(1),T=k(10);let Q=null;const se=new Set(["PENDING","IN PROGRESS","QUEUED","NEW"]),me=b(()=>n.value&&se.has(n.value.status)),ge=b(()=>n.value&&(n.value.type==="instant_ebook_blueprint"||n.value.type==="random_ebook_generator")),he=b(()=>n.value&&!["popular_books_in_niche","instant_ebook_blueprint","random_ebook_generator"].includes(n.value.type)),W=b(()=>{var s;switch((s=n.value)==null?void 0:s.type){case"best_keyword_categories_for_ebook":return"Best keyword or category for ebook";case"generate_author_bio":return"Generated author bio";case"random_ebook_generator":return"Generated random eBook details";case"instant_ebook_blueprint":return"Instant eBook Blueprint";default:return"Book title"}}),L=b(()=>{var s,e;return((e=(s=n.value)==null?void 0:s.entries)==null?void 0:e.length)??0}),A=b(()=>Math.max(1,Math.ceil(L.value/B.value))),F=b(()=>{var e;const s=(_.value-1)*B.value;return(((e=n.value)==null?void 0:e.entries)??[]).slice(s,s+B.value)}),fe=b(()=>{if(!L.value)return"";const s=(_.value-1)*B.value+1,e=Math.min(_.value*B.value,L.value);return`Showing ${s} to ${e} of ${L.value} results`}),j=b(()=>{var s,e;return((e=(s=n.value)==null?void 0:s.books)==null?void 0:e.length)??0}),I=b(()=>Math.max(1,Math.ceil(j.value/T.value))),G=b(()=>{var e;const s=(y.value-1)*T.value;return(((e=n.value)==null?void 0:e.books)??[]).slice(s,s+T.value)}),_e=b(()=>{if(!j.value)return"";const s=(y.value-1)*T.value+1,e=Math.min(y.value*T.value,j.value);return`Showing ${s} to ${e} of ${j.value} results`});H(B,()=>{_.value=1}),H(T,()=>{y.value=1}),H(A,s=>{_.value>s&&(_.value=s)}),H(I,s=>{y.value>s&&(y.value=s)});const le=b(()=>F.value.length>0&&F.value.every(s=>
1v.value.includes(s.id))),oe=b(()=>G.value.length>0&&G.value.every(s=>c.value.includes(s.id)));function ye(){const s=F.value.map(e=>e.id);le.value?v.value=v.value.filter(e=>!s.includes(e)):v.value=[...new Set([...v.value,...s])]}function we(){const s=G.value.map(e=>e.id);oe.value?c.value=c.value.filter(e=>!s.includes(e)):c.value=[...new Set([...c.value,...s])]}function Ce(s,e){return s?s.length>e?s.slice(0,e)+"…":s:""}async function K(s=!1){var e,u;s||(X.value=!0);try{const{data:p}=await R.get(`/research-campaigns/${g.id}`);n.value=p.data,xe()}catch(p){w.error(((u=(e=p.response)==null?void 0:e.data)==null?void 0:u.message)??"Failed to load campaign."),te.replace("/research")}finally{X.value=!1}}function xe(){clearTimeout(Q),n.value&&se.has(n.value.status)&&(Q=setTimeout(()=>K(!0),6e3))}async function ne(){var s,e;S.value=!1;try{const{data:u}=await R.post(`/research-campaigns/${g.id}/start`);w.success(u.message??"Campaign starting now!"),K(!0)}catch(u){w.error(((e=(s=u.response)==null?void 0:s.data)==null?void 0:e.message)??"Failed to start campaign.")}}function $e(){S.value=!1,te.push(`/research/create?clone=${g.id}`)}async function ae(s,e){try{const{data:u}=await R.post(`/research-campaigns/${g.id}/${e}/${s.id}/favorite`);s.favorite=u.favorite,w.success(u.message??(s.favorite?"Favorited":"Unfavorited"))}catch{w.error("Failed to update favorite.")}}async function ie(s){try{await navigator.clipboard.writeText(s),w.success("Copied")}catch{w.error("Copy failed.")}}function Be(){ie(n.value.entries.map(s=>s.entry).join(`
2`))}function Te(){const s=n.value.entries.filter(e=>v.value.includes(e.id));ie(s.map(e=>e.entry).join(`
3`))}function O(s,e,u){const p=new Blob([s],{type:u}),V=URL.createObjectURL(p),D=document.createElement("a");D.href=V,D.download=e,D.click(),URL.revokeObjectURL(V)}function z(s){const e=String(s??"");return/[",\n]/.test(e)?`"${e.replace(/"/g,'""')}"`:e}function ue(s){const e=n.value.entries.filter(u=>v.value.includes(u.id));if(s==="csv"){const u=["entry",...e.map(p=>z(p.entry))].join(`
4`);O(u,`research-campaign-${g.id}-entries.csv`,"text/csv")}else O(e.map(u=>u.entry).join(`
5`),`research-campaign-${g.id}-entries.txt`,"text/plain")}function re(s){const e=n.value.books.filter(u=>c.value.includes(u.id));if(s==="csv"){const u=["book_name,author,summary",...e.map(p=>[z(p.book_name),z(p.author),z(p.summary)].join(","))].join(`
6`);O(u,`research-campaign-${g.id}-books.csv`,"text/csv")}else O(e.map(u=>`${u.book_name} — ${u.author}
7${u.summary}`).join(`
8
9`),`research-campaign-${g.id}-books.txt`,"text/plain")}async function Ee(){U.value=!0;try{if($.value==="entries"){const{data:s}=await R.post(`/research-campaigns/${g.id}/entries/delete`,{ids:v.value});w.success(s.message??"Deleted."),v.value=[]}else{const{data:s}=await R.post(`/research-campaigns/${g.id}/books/delete`,{ids:c.value});w.success(s.message??"Deleted."),c.value=[]}$.value=null,K(!0)}catch{w.error("Failed to delete entries.")}finally{U.value=!1}}function de(){S.value=!1,h.value=null}return De(()=>{document.addEventListener("click",de),K()}),Ve(()=>{document.removeEventListener("click",de),clearTimeout(Q)}),(s,e)=>{var p,V,D,ve,ce;const u=Me("router-link");return o(),a("div",null,[t("div",Ue,[M(u,{class:"btn-ghost",to:"/research"},{default:N(()=>e[32]||(e[32]=[m("← Back to Research")])),_:1,__:[32]}),n.value?(o(),a("div",Le,[t("div",Ae,[t("button",{class:"btn-warning",onClick:e[0]||(e[0]=C(l=>S.value=!S.value,["stop"]))},e[33]||(e[33]=[m(" Action "),t("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2.5"},[t("polyline",{points:"6 9 12 15 18 9"})],-1)])),S.value?(o(),a("div",{key:0,class:"ctx-menu",onClick:e[2]||(e[2]=C(()=>{},["stop"]))},[n.value.logs_url?(o(),a("a",{key:0,class:"ctx-item",href:n.value.logs_url,target:"_blank",rel:"noopener",onClick:e[1]||(e[1]=l=>S.value=!1)},"Logs",8,Fe)):r("",!0),n.value.status==="FAILED"?(o(),a("button",{key:1,class:"ctx-item",onClick:ne},"Re-try")):r("",!0),n.value.status==="DRAFT"?(o(),a("button",{key:2,class:"ctx-item",onClick:ne},"Start")):r("",!0),t("button",{class:"ctx-item",onClick:$e},"Clone")])):r("",!0)]),M(u,{class:"btn-edit",to:`/research/${g.id}/edit`},{default:N(()=>e[34]||(e[34]=[t("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),t("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})],-1),m(" Edit ")])),_:1,__:[34]},8,["to"])])):r("",!0)]),X.value&&!n.value?(o(),a("div",je,"Loading…")):n.value?(o(),a(x,{key:1},[t("div",Ie,[e[41]||(e[41]=t("h2",{class:"card-title"},"Campaign information",-1)),t("div",Ge,[t("div",Ke,[t("div",Oe,[e[35]||(e[35]=t("span",{class:"info-label"},"Campaign Name",-1)),t("span",ze,i(n.value.name),1)]),t("div",He,[e[36]||(e[36]=t("span",{class:"info-label"},"Ai model",-1)),t("span",qe,i(n.value.ai_model),1)]),ge.value?(o(),a("div",Xe,[e[37]||(e[37]=t("span",{class:"info-label"},"Topic",-1)),t("span",Qe,i(n.value.topic),1)])):r("",!0),t("div",We,[e[38]||(e[38]=t("span",{class:"info-label"},"Status",-1)),t("span",{class:J(["status-badge","sb-"+n.value.status_color])},i(n.value.status_label),3)])]),t("div",Je,[t("div",Ye,[e[39]||(e[39]=t("span",{class:"info-label"},"Type",-1)),t("span",Ze,i(n.value.type_label),1)]),t("div",et,[e[40]||(e[40]=t("span",{class:"info-label"},"Created at",-1)),t("span",tt,i(n.value.created_date),1)])])])]),me.value?(o(),a("div",st,e[42]||(e[42]=[t("span",{class:"spinner"},null,-1),t("div",null,[t("strong",null,"Campaign is running…"),t("p",null,"Results will appear here automatically when generation finishes.")],-1)]))):r("",!0),n.value.type==="instant_ebook_blueprint"&&n.value.blueprint?(o(),a("div",lt,[e[49]||(e[49]=t("h2",{class:"card-title"},"Instant eBook Blueprint Results",-1)),t("div",ot,[e[43]||(e[43]=t("h3",{class:"result-label"},"📚 Book Titles",-1)),t("ul",nt,[(o(!0),a(x,null,E(n.value.blueprint.titles,(l,d)=>(o(),a("li",{key:d},i(l),1))),128))])]),t("div",at,[e[44]||(e[44]=t("h3",{class:"result-label"},"📖 eBook Context",-1)),t("p",it,i(n.value.blueprint.ebook_context),1)]),t("div",ut,[e[45]||(e[45]=t("h3",{class:"result-label"},"✍️ Pen Names",-1)),t("ul",rt,[(o(!0),a(x,null,E(n.value.blueprint.pen_names,(l,d)=>(o(),a("li",{key:d},i(l),1))),128))])]),t("div",dt,[e[46]||(e[46]=t("h3",{class:"result-label"},"📝 eBook Description (for Kindle/Platforms)",-1)),t("p",vt,i(n.value.blueprint.ebook_description),1)]),t("div",ct,[e[47]||(e[47]=t("h3",{class:"result-label"},"🔍 eBook Keywords",-1)),t("ul",pt,[(o(!0),a(x,null,E(n.value.blueprint.keywords,(l,d)=>(o(),a("li",{key:d},i(l),1))),128))])]),t("div",kt,[e[48]||(e[48]=t("h3",{class:"result-label"},"📂 Categories for Platforms",-1)),t("ul",bt,[(o(!0),a(x,null,E(n.value.blueprint.categories,(l,d)=>(o(),a("li",{key:d},i(l),1))),128))])])])):r("",!0),n.value.type==="random_ebook_generator"&&n.value.random?(o(),a("div",mt,[e[55]||(e[55]=t("h2",{class:"card-title"},"Generated Random eBook Details",-1)),t("div",gt,[e[50]||(e[50]=t("h3",{class:"result-label"}
9,"📚 Book Title",-1)),t("p",ht,i(n.value.random.title),1)]),t("div",ft,[e[51]||(e[51]=t("h3",{class:"result-label"},"✍️ Author Name",-1)),t("p",_t,i(n.value.random.author_name),1)]),t("div",yt,[e[52]||(e[52]=t("h3",{class:"result-label"},"📖 eBook Context",-1)),t("p",wt,i(n.value.random.context),1)]),t("div",Ct,[e[53]||(e[53]=t("h3",{class:"result-label"},"📝 KDP Description",-1)),t("p",xt,i(n.value.random.description),1)]),t("div",$t,[e[54]||(e[54]=t("h3",{class:"result-label"},"🔍 Keywords",-1)),t("ul",Bt,[(o(!0),a(x,null,E(n.value.random.keywords,(l,d)=>(o(),a("li",{key:d},i(l),1))),128))])])])):r("",!0),he.value?(o(),a("div",Tt,[t("div",Et,[t("h2",St,i(W.value),1),(p=n.value.entries)!=null&&p.length?(o(),a("button",{key:0,class:"btn-teal",onClick:Be},"Copy")):r("",!0)]),v.value.length?(o(),a("div",Pt,[t("div",Dt,[t("button",{class:"btn-outline",onClick:e[3]||(e[3]=C(l=>h.value=h.value==="entries"?null:"entries",["stop"]))},e[56]||(e[56]=[t("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},[t("circle",{cx:"12",cy:"5",r:"1.6"}),t("circle",{cx:"12",cy:"12",r:"1.6"}),t("circle",{cx:"12",cy:"19",r:"1.6"})],-1),m(" Export ")])),h.value==="entries"?(o(),a("div",{key:0,class:"ctx-menu ctx-left",onClick:e[6]||(e[6]=C(()=>{},["stop"]))},[t("button",{class:"ctx-item",onClick:e[4]||(e[4]=l=>{ue("csv"),h.value=null})},"Export CSV"),t("button",{class:"ctx-item",onClick:e[5]||(e[5]=l=>{ue("txt"),h.value=null})},"Export TXT")])):r("",!0)]),t("button",{class:"btn-teal",onClick:Te},e[57]||(e[57]=[t("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),t("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})],-1),m(" Copy Selected ")])),t("button",{class:"btn-red",onClick:e[7]||(e[7]=l=>$.value="entries")},e[58]||(e[58]=[t("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("polyline",{points:"3 6 5 6 21 6"}),t("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})],-1),m(" Delete selected ")]))])):r("",!0),v.value.length?(o(),a("div",Vt,[t("span",null,i(v.value.length)+" record"+i(v.value.length===1?"":"s")+" selected",1),t("button",{class:"deselect-btn",onClick:e[8]||(e[8]=l=>v.value=[])},"Deselect all")])):r("",!0),(V=n.value.entries)!=null&&V.length?(o(),a("table",Mt,[t("thead",null,[t("tr",null,[t("th",Nt,[t("input",{type:"checkbox",checked:le.value,onChange:ye},null,40,Rt)]),t("th",null,i(W.value),1),e[59]||(e[59]=t("th",{style:{width:"120px"}},null,-1))])]),t("tbody",null,[(o(!0),a(x,null,E(F.value,l=>(o(),a("tr",{key:l.id,class:J({"row-selected":v.value.includes(l.id)})},[t("td",null,[q(t("input",{"onUpdate:modelValue":e[9]||(e[9]=d=>v.value=d),type:"checkbox",value:l.id},null,8,Ut),[[ke,v.value]])]),t("td",Lt,i(Ce(l.entry,150)),1),t("td",null,[t("div",At,[t("button",{class:"btn-star",title:l.favorite?"Unfavorite":"Favorite",onClick:d=>ae(l,"entries")},[(o(),a("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:l.favorite?"#f59e0b":"none",stroke:"#f59e0b","stroke-width":"2"},e[60]||(e[60]=[t("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"},null,-1)]),8,jt))],8,Ft),t("button",{class:"btn-view",onClick:d=>P.value=l},e[61]||(e[61]=[t("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),t("circle",{cx:"12",cy:"12",r:"3"})],-1),m(" View ")]),8,It)])])],2))),128))])])):(o(),a("p",Gt,"No data found for this campaign.")),(D=n.value.entries)!=null&&D.length?(o(),a("div",Kt,[t("span",Ot,i(fe.value),1),t("div",zt,[A.value>1?(o(),a("div",Ht,[t("button",{class:"pg-btn",disabled:_.value<=1,onClick:e[10]||(e[10]=l=>_.value--)},"‹",8,qt),t("span",Xt,"Page "+i(_.value)+" of "+i(A.value),1),t("button",{class:"pg-btn",disabled:_.value>=A.value,onClick:e[11]||(e[11]=l=>_.value++)},"›",8,Qt)])):r("",!0),t("label",Wt,[e[63]||(e[63]=m(" Per page ")),q(t("select",{"onUpdate:modelValue":e[12]||(e[12]=l=>B.value=l),class:"per-page-select"},e[62]||(e[62]=[t("option",{value:5},"5",-1),t("option",{value:10},"10",-1),t("option",{value:25},"25",-1),t("option",{value:50},"50",-1)]),512),[[pe,B.value,void 0,{number:!0}]])])])])):r("",!0)])):r("",!0),n.value.type==="popular_books_in_niche"?(o(),a("div",Jt,[e[73]||(e[73]=t("div",{class:"table-head"},[t("h2",{class:"card-title",style:{margin:"0"}},"Popular books in niche")],-1)),c.value.length?(o(),a("div",Yt,[t("div",Zt,[t("button",{class:"btn-outline",onClick:e[13]||(e[13]=C(l=>h.value=h.value==="books"?null:"books",["stop"]))},e[64]||(e[64]=[t("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"
9currentColor"},[t("circle",{cx:"12",cy:"5",r:"1.6"}),t("circle",{cx:"12",cy:"12",r:"1.6"}),t("circle",{cx:"12",cy:"19",r:"1.6"})],-1),m(" Export ")])),h.value==="books"?(o(),a("div",{key:0,class:"ctx-menu ctx-left",onClick:e[16]||(e[16]=C(()=>{},["stop"]))},[t("button",{class:"ctx-item",onClick:e[14]||(e[14]=l=>{re("csv"),h.value=null})},"Export CSV"),t("button",{class:"ctx-item",onClick:e[15]||(e[15]=l=>{re("txt"),h.value=null})},"Export TXT")])):r("",!0)]),t("button",{class:"btn-red",onClick:e[17]||(e[17]=l=>$.value="books")},e[65]||(e[65]=[t("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("polyline",{points:"3 6 5 6 21 6"}),t("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})],-1),m(" Delete selected ")]))])):r("",!0),c.value.length?(o(),a("div",es,[t("span",null,i(c.value.length)+" record"+i(c.value.length===1?"":"s")+" selected",1),t("button",{class:"deselect-btn",onClick:e[18]||(e[18]=l=>c.value=[])},"Deselect all")])):r("",!0),(ve=n.value.books)!=null&&ve.length?(o(),a("table",ts,[t("thead",null,[t("tr",null,[t("th",ss,[t("input",{type:"checkbox",checked:oe.value,onChange:we},null,40,ls)]),e[66]||(e[66]=t("th",null,"Book name",-1)),e[67]||(e[67]=t("th",null,"Author name",-1)),e[68]||(e[68]=t("th",{style:{width:"120px"}},null,-1))])]),t("tbody",null,[(o(!0),a(x,null,E(G.value,l=>(o(),a("tr",{key:l.id,class:J({"row-selected":c.value.includes(l.id)})},[t("td",null,[q(t("input",{"onUpdate:modelValue":e[19]||(e[19]=d=>c.value=d),type:"checkbox",value:l.id},null,8,os),[[ke,c.value]])]),t("td",ns,i(l.book_name),1),t("td",as,i(l.author),1),t("td",null,[t("div",is,[t("button",{class:"btn-star",title:l.favorite?"Unfavorite":"Favorite",onClick:d=>ae(l,"books")},[(o(),a("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:l.favorite?"#f59e0b":"none",stroke:"#f59e0b","stroke-width":"2"},e[69]||(e[69]=[t("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"},null,-1)]),8,rs))],8,us),t("button",{class:"btn-view",onClick:d=>f.value=l},e[70]||(e[70]=[t("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[t("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),t("circle",{cx:"12",cy:"12",r:"3"})],-1),m(" View ")]),8,ds)])])],2))),128))])])):(o(),a("p",vs,"No data found for this campaign.")),(ce=n.value.books)!=null&&ce.length?(o(),a("div",cs,[t("span",ps,i(_e.value),1),t("div",ks,[I.value>1?(o(),a("div",bs,[t("button",{class:"pg-btn",disabled:y.value<=1,onClick:e[20]||(e[20]=l=>y.value--)},"‹",8,ms),t("span",gs,"Page "+i(y.value)+" of "+i(I.value),1),t("button",{class:"pg-btn",disabled:y.value>=I.value,onClick:e[21]||(e[21]=l=>y.value++)},"›",8,hs)])):r("",!0),t("label",fs,[e[72]||(e[72]=m(" Per page ")),q(t("select",{"onUpdate:modelValue":e[22]||(e[22]=l=>T.value=l),class:"per-page-select"},e[71]||(e[71]=[t("option",{value:5},"5",-1),t("option",{value:10},"10",-1),t("option",{value:25},"25",-1),t("option",{value:50},"50",-1)]),512),[[pe,T.value,void 0,{number:!0}]])])])])):r("",!0)])):r("",!0)],64)):r("",!0),(o(),Y(ee,{to:"body"},[M(Z,{name:"fade"},{default:N(()=>[P.value?(o(),a("div",{key:0,class:"modal-overlay",onClick:e[25]||(e[25]=C(l=>P.value=null,["self"]))},[t("div",_s,[t("div",ys,[t("h3",null,i(W.value),1),t("button",{class:"modal-close",onClick:e[23]||(e[23]=l=>P.value=null)},"×")]),t("div",ws,[t("p",Cs,i(P.value.entry),1)]),t("div",xs,[t("button",{class:"btn-cancel",onClick:e[24]||(e[24]=l=>P.value=null)},"Close")])])])):r("",!0)]),_:1})])),(o(),Y(ee,{to:"body"},[M(Z,{name:"fade"},{default:N(()=>{var l;return[f.value?(o(),a("div",{key:0,class:"modal-overlay",onClick:e[28]||(e[28]=C(d=>f.value=null,["self"]))},[t("div",$s,[t("div",Bs,[t("h3",null,i(f.value.book_name),1),t("button",{class:"modal-close",onClick:e[26]||(e[26]=d=>f.value=null)},"×")]),t("div",Ts,[t("div",Es,[e[74]||(e[74]=t("h3",{class:"result-label"},"Book name",-1)),t("p",Ss,i(f.value.book_name),1)]),t("div",Ps,[e[75]||(e[75]=t("h3",{class:"result-label"},"Author name",-1)),t("p",Ds,i(f.value.author),1)]),t("div",Vs,[e[76]||(e[76]=t("h3",{class:"result-label"},"Book summary",-1)),t("p",Ms,i(f.value.summary),1)]),t("div",Ns,[e[77]||(e[77]=t("h3",{class:"result-label"},"Key takeaways",-1)),(l=f.value.key_takeways)!=null&&l.length?(o(),a("ol",Rs,[(o(!0),a(x,null,E(f.value.key_takeways,(d,Se)=>(o(),a("li",{key:Se},i(d),1))),128))])):(o(),a("p",Us,"No key takeaways available."))])]),t("div",Ls,[t("button",{class:"btn-cancel",onClick:e[27]||(e[27]=d=>f.value=null)},"Close")])])])):r("",!0)]}),_:1})])),(o(),Y(ee,{to:"body"},[M(Z,{name:"fade"},{default:N(()=>[$.value?(o(),a("div",{key:0,class:"modal-overlay",onClick:e[31]||(e[31]=C(l=>$.value=null,["self"]))},[t("div",As,[t("div",Fs,[e[78]||(e[78]=t("h3",null,"Delete selected",-1)),t("button",{class:"modal-close",onClick:e[29]||(e[29]=l=>$.value=null)},"×")]),e[79]||(e[79]=t("div",{class:"modal-body"},[t("p",null,"Are you sure you would like to do this?")],-1)),t("div",js,[t("button",{class:"btn-cancel",onClick:e[30]||(e[30]=l=>$.value=null)},"Cancel"),t("button",{class:"btn-red",disabled:U.value,onClick:Ee},i(U.value?"Deleting…":"Confirm"),9,Is)])])])):r("",!0)]),_:1})]))])}}}
9,qs=Pe(Gs,[["__scopeId","data-v-12138d1f"]]);export{qs 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.