From b9bfa3347b4404bea03ef51ac67260cffc3348d3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 21 Sep 2022 02:13:29 +0000 Subject: [PATCH] web source editor: v3.22.092110 --- app/src/main/assets/web/source/index.html | 2 +- .../assets/web/source/js/{app.4c797a95.js => app.eff784a4.js} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename app/src/main/assets/web/source/js/{app.4c797a95.js => app.eff784a4.js} (53%) diff --git a/app/src/main/assets/web/source/index.html b/app/src/main/assets/web/source/index.html index c6f2301a9..f21bfd687 100644 --- a/app/src/main/assets/web/source/index.html +++ b/app/src/main/assets/web/source/index.html @@ -1 +1 @@ -legado_web_source_editor
\ No newline at end of file +legado_web_source_editor
\ No newline at end of file diff --git a/app/src/main/assets/web/source/js/app.4c797a95.js b/app/src/main/assets/web/source/js/app.eff784a4.js similarity index 53% rename from app/src/main/assets/web/source/js/app.4c797a95.js rename to app/src/main/assets/web/source/js/app.eff784a4.js index c4e323bd2..3b5e43c93 100644 --- a/app/src/main/assets/web/source/js/app.4c797a95.js +++ b/app/src/main/assets/web/source/js/app.eff784a4.js @@ -1 +1 @@ -(function(){"use strict";var e={2088:function(e,t,n){var o=n(9963),r=n(6252);const i={class:"editor"};function a(e,t,n,o,a,l){const c=(0,r.up)("router-view");return(0,r.wg)(),(0,r.iD)("div",i,[(0,r.Wm)(c)])}var l={setup(){}},c=n(3744);const s=(0,c.Z)(l,[["render",a]]);var u=s,d=n(2201),h=n(3577);const p=e=>((0,r.dD)("data-v-0fc56f5e"),e=e(),(0,r.Cn)(),e),g={class:"left"},w=p((()=>(0,r._)("div",null,[(0,r._)("a",{href:"/"},"←主页"),(0,r._)("b",null,"书源")],-1))),v=["onClick"],m=["onClick"],S=["onClick"],f=["onClick"],b=["onClick"],C=["onClick"],_=["onClick"],k=["onClick"];function y(e,t,n,o,i,a){const l=(0,r.up)("router-link"),c=(0,r.up)("router-view"),s=(0,r.up)("edit-menu"),u=(0,r.up)("edit-out");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r._)("div",g,[(0,r._)("div",null,[w,(0,r._)("ul",null,[(0,r.Wm)(l,{to:{name:"book-base"},custom:""},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 基础 ",10,v)])),_:1}),(0,r.Wm)(l,{to:{name:"book-search"},custom:""},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 搜索 ",10,m)])),_:1}),(0,r.Wm)(l,{to:{name:"book-find"},custom:""},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 发现 ",10,S)])),_:1}),(0,r.Wm)(l,{custom:"",to:{name:"book-detail"}},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 详情 ",10,f)])),_:1}),(0,r.Wm)(l,{custom:"",to:{name:"book-directory"}},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 目录 ",10,b)])),_:1}),(0,r.Wm)(l,{custom:"",to:{name:"book-content"}},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 正文 ",10,C)])),_:1}),(0,r.Wm)(l,{custom:"",to:{name:"book-review"}},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 段评 ",10,_)])),_:1}),(0,r.Wm)(l,{custom:"",to:{name:"book-other"}},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 其他 ",10,k)])),_:1})])]),(0,r.Wm)(c,null,{default:(0,r.w5)((({Component:e})=>[((0,r.wg)(),(0,r.j4)(r.Ob,null,[((0,r.wg)(),(0,r.j4)((0,r.LL)(e)))],1024))])),_:1})]),(0,r.Wm)(s),(0,r.Wm)(u)],64)}var D=n(2262);n(7658);const U=e=>((0,r.dD)("data-v-5c287c97"),e=e(),(0,r.Cn)(),e),I={class:"menu"},x=(0,r.Uk)("⇈推送源 "),T=U((()=>(0,r._)("span",null,"Ctrl+P",-1))),K=[x,T],j=(0,r.Uk)("⇊拉取源 "),B=U((()=>(0,r._)("span",null,"Shift+P",-1))),A=[j,B],E=(0,r.Uk)(" ⋙生成源"),L=U((()=>(0,r._)("span",null,"Ctrl+E",-1))),H=[E,L],R=(0,r.Uk)(" ⋘编辑源"),N=U((()=>(0,r._)("span",null,"Shift+E",-1))),O=[R,N],J=(0,r.Uk)(" ✗清空表单"),q=U((()=>(0,r._)("span",null,"Shift+C",-1))),W=[J,q],Z=(0,r.Uk)("↶撤销操作"),P=U((()=>(0,r._)("span",null,"Ctrl+Z",-1))),$=[Z,P],M=(0,r.Uk)("↷重做操作"),Y=U((()=>(0,r._)("span",null,"Shift+R",-1))),V=[M,Y],z=(0,r.Uk)(" ⇏调试源 "),F=U((()=>(0,r._)("span",null,"Ctrl+Enter",-1))),G=[z,F],Q=(0,r.Uk)(" ✓保存源"),X=U((()=>(0,r._)("span",null,"Ctrl+S",-1))),ee=[Q,X];function te(e,t,n,o,i,a){const l=(0,r.up)("edit-loading"),c=(0,r.up)("edit-warn"),s=(0,r.up)("edit-success");return(0,r.wg)(),(0,r.iD)("div",I,[(0,r._)("div",null,[o.showLoading?((0,r.wg)(),(0,r.j4)(l,{key:0})):(0,r.kq)("",!0),(0,r.Wm)(c,{text:o.warnText,"is-show":o.warnShow,onChangeShow:o.changeShow},null,8,["text","is-show","onChangeShow"]),o.successShow?((0,r.wg)(),(0,r.j4)(s,{key:1,isShow:o.successShow,onChangeShow:o.changeSuccessShow,text:o.successText},null,8,["isShow","onChangeShow","text"])):(0,r.kq)("",!0)]),(0,r._)("button",{onClick:t[0]||(t[0]=(...e)=>o.push&&o.push(...e)),title:"Ctrl+P"},K),(0,r._)("button",{onClick:t[1]||(t[1]=(...e)=>o.pull&&o.pull(...e)),title:"Shift+P"},A),(0,r._)("button",{onClick:t[2]||(t[2]=(...e)=>o.conver2Tab&&o.conver2Tab(...e)),title:"Ctrl+E"},H),(0,r._)("button",{onClick:t[3]||(t[3]=(...e)=>o.conver2Source&&o.conver2Source(...e)),title:"Shift+E"},O),(0,r._)("button",{onClick:t[4]||(t[4]=(...e)=>o.clearEdit&&o.clearEdit(...e)),title:"Shift+C"},W),(0,r._)("button",{onClick:t[5]||(t[5]=(...e)=>o.undo&&o.undo(...e)),title:"Ctrl+Z"},$),(0,r._)("button",{onClick:t[6]||(t[6]=(...e)=>o.redo&&o.redo(...e)),title:"Shift+R"},V),(0,r._)("button",{onClick:t[7]||(t[7]=(...e)=>o.debug&&o.debug(...e)),title:"Ctrl+Enter"},G),(0,r._)("button",{onClick:t[8]||(t[8]=(...e)=>o.saveSource&&o.saveSource(...e)),title:"Ctrl+S"},ee)])}function ne(e,t){return fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>e.json()))}function oe(e){return fetch(e).then((e=>e.json()))}function re(e,t=!0){let n=/bookSource/.test(location.href),o=`http://${localStorage.getItem("url")||location.host}/`,r=n?"BookSource":"RssSource";return`${o}${e}${r}${t?"s":""}`}function ie(){return oe(re("get"))}function ae(e){return ne(re("save"),e)}function le(e){return ne(re("save",!1),e)}function ce(e){return ne(re("delete"),e)}var se=n(3907),ue=(0,se.MT)({state:{url:localStorage.getItem("url")||"",bookSources:[],rssSources:[],currentSource:{},currentTab:localStorage.getItem("tabName")||"editTab",editTabSource:{},deBugMsg:"",searchKey:""},getters:{},mutations:{changeSearchKey(e,t){e.searchKey=t},saveSources(e,t){/bookSource/.test(location.href)?e.bookSources=t:e.rssSources=t},saveCurrentSource(e){let t,n,o=e.currentSource;/bookSource/.test(location.href)?(o=e.bookSources,n="bookSourceUrl"):(o=e.rssSources,n="sourceUrl");let r=t.findIndex((e=>e[n]===o[n]));r>-1?t.splice(r,1,o):t.push(o)},changeCurrentSource(e,t){const n=JSON.stringify(t);e.currentSource=JSON.parse(n)},changeCurrentSourceValue(e,t){let n={true:!0,false:!1},o=n[t.value]||t.value;if(/\d+/.test(o)&&(o=parseInt(o)),t.type.includes("_")){let n=t.type.split("_")[0],r=t.type.split("_")[1],i={};i[r]=o,e.currentSource[n]=Object.assign(e.currentSource[n]||{},i)}else e.currentSource[t.type]=o;e.currentSource.lastUpdateTime=(new Date).getTime()},changeTabName(e,t){e.currentTab=t,localStorage.setItem("tabName",t),console.log(t)},changeEditTabSource(e,t){const n=JSON.stringify(t);e.editTabSource=JSON.parse(n)},editHistory(e,t){let n;if(localStorage.getItem("history"))n=JSON.parse(localStorage.getItem("history")),n.new.push(t),n.new.length>50&&n.new.shift(),n.old.length>50&&n.old.shift(),localStorage.setItem("history",JSON.stringify(n));else{const e={new:[t],old:[]};localStorage.setItem("history",JSON.stringify(e))}},editHistoryUndo(e){if(localStorage.getItem("history")){let t=JSON.parse(localStorage.getItem("history"));t.old.push(e.currentSource),t.new.length&&(e.currentSource=t.new.pop()),localStorage.setItem("history",JSON.stringify(t))}},clearAllHistory(){localStorage.setItem("history",JSON.stringify({new:[],old:[]}))},clearEdit(e){e.editTabSource={},e.currentSource={}},appendDeBugMsg(e,t){let n=document.querySelector("#debug_text");n.scrollTop=n.scrollHeight,e.deBugMsg+=t+"\n"},clearDeBugMsg(e){e.deBugMsg=""},clearAllSource(e){e.bookSources=[],e.rssSources=[]}},actions:{},modules:{}});const de=e=>((0,r.dD)("data-v-ab8a8a34"),e=e(),(0,r.Cn)(),e),he={class:"fixed"},pe=de((()=>(0,r._)("div",{class:"half-circle-spinner"},[(0,r._)("div",{class:"circle circle-1"}),(0,r._)("div",{class:"circle circle-2"})],-1))),ge=[pe];function we(e,t,n,o,i,a){return(0,r.wg)(),(0,r.iD)("div",he,ge)}var ve={name:"editLoading"};const me=(0,c.Z)(ve,[["render",we],["__scopeId","data-v-ab8a8a34"]]);var Se=me;const fe={key:0,class:"warm"};function be(e,t,n,o,i,a){return n.isShow?((0,r.wg)(),(0,r.iD)("div",fe,[(0,r._)("p",null,(0,h.zw)(n.text),1),(0,r._)("div",null,[(0,r._)("button",{onClick:t[0]||(t[0]=(...e)=>o.changeShow&&o.changeShow(...e))},"关闭")])])):(0,r.kq)("",!0)}var Ce={name:"editWarm",props:{isShow:{default:!1,type:Boolean},text:{type:String,default:""}},setup(e,{emit:t}){const n=()=>{t("changeShow",!e.isShow)};return{changeShow:n}}};const _e=(0,c.Z)(Ce,[["render",be],["__scopeId","data-v-27eae50d"]]);var ke=_e;const ye={class:"success"};function De(e,t,n,o,i,a){return(0,r.wg)(),(0,r.iD)("div",ye,[(0,r._)("p",null,(0,h.zw)(n.text),1)])}var Ue={props:{text:{type:String,default:""},isShow:{type:Boolean,default:!1}},emits:["changeShow"],setup(e,{emit:t}){return setTimeout((()=>{t("changeShow",!e.isShow)}),3e3),{}}};const Ie=(0,c.Z)(Ue,[["render",De],["__scopeId","data-v-bef92f74"]]);var xe=Ie,Te={components:{editLoading:Se,editWarn:ke,editSuccess:xe},setup(){const e=(0,D.iH)(!1),t=(0,D.iH)(!1),n=(0,D.iH)(""),o=(0,D.iH)(!1),i=(0,D.iH)(""),a=e=>{t.value=e},l=e=>{console.log(e),o.value=e},c=()=>{e.value=!0,ie().then((r=>{e.value=!1,r.isSuccess?(ue.commit("changeTabName","editList"),ue.commit("saveSources",r.data),n.value=`成功拉取${r.data.length}条源`,o.value=!0):(i.value=r.errorMsg,t.value=!0)})).catch((n=>{console.log(n),e.value=!1,i.value=" 请求发生了错误,请检查你的后端地址,填写是否正确,或者 阅读APP\n确认开启web服务",t.value=!0}))},s=()=>{n.value="正在推送中",o.value=!0,e.value=!0;let r=/bookSource/.test(location.href)?ue.state.bookSources:ue.state.rssSources;ae(r).then((a=>{if(a.isSuccess){let e=a.data;if(Array.isArray(e)){let t="";r.length>e.length&&(r.forEach((t=>{e.find((e=>e.bookSourceUrl===t.bookSourceUrl))||console.log(t.bookSourceUrl)})),t="\n推送失败的源将用红色字体标注!"),n.value=`批量推送源到「阅读3.0APP」\n共计: ${r.length} 条\n成功: ${e.length} 条\n失败: ${r.length-e.length} 条${t}`,o.value=!0}else n.value=`批量推送源到「阅读3.0APP」成功!\n共计: ${r.length} 条`,o.value=!0}else i.value=`批量推送源失败!\nErrorMsg: ${a.errorMsg}`,t.value=!0;e.value=!1})).catch((n=>{console.log(n),e.value=!1,t.value=!0,i.value="请求发生了错误,请检查你的后端地址,填写是否正确,或者 阅读APP\n确认开启web服务"}))},u=()=>{ue.commit("changeEditTabSource",ue.state.currentSource),ue.commit("changeTabName","editTab")},d=()=>{ue.commit("changeCurrentSource",ue.state.editTabSource)},h=()=>{ue.commit("editHistoryUndo")},p=()=>{ue.commit("clearEdit"),console.log("已清除"),n.value="已清除",o.value=!0},g=()=>{ue.commit("clearEdit"),ue.commit("clearAllHistory"),n.value="已清除所有历史记录",o.value=!0},w=()=>{let e=/bookSource/.test(location.href),r=ue.state.currentSource;e&&""!==r.bookSourceUrl&&""!==r.bookSourceType&&""!==r.bookSourceName||!e&&""!==r.sourceUrl&&""!==r.sourceName?le(r).then((a=>{a.isSuccess?(n.value=`源《${e?r.bookSourceName:r.sourceName}》已成功保存到「阅读3.0APP」`,o.value=!0,ue.commit("saveCurrentSource")):(i.value=`源《${e?r.bookSourceName:r.sourceName}》保存失败!\nErrorMsg: ${a.errorMsg}`,t.value=!0)})):(i.value="请检查<必填>项是否全部填写",t.value=!0)},v=()=>{e.value=!0,ue.commit("clearDeBugMsg"),ue.commit("changeTabName","editDebug");let t=/bookSource/.test(location.href),r=ue.state.currentSource;le(r).then((i=>{console.log(i);let a="ws://"+(localStorage.getItem("url")||location.host).replace(/\d+$/,(e=>parseInt(e)+1))+"/"+(t?"bookSourceDebug":"rssSourceDebug");console.log(a);const l=new WebSocket(a);let c="",s=t?r.bookSourceUrl:r.sourceUrl;t&&(c=r.ruleSearch.checkKeyWord?r.ruleSearch.checkKeyWord:ue.state.searchKey?ue.state.searchKey:"我的"),l.onopen=()=>{l.send(`{"tag":"${s}", "key":"${c}"}`)},l.onmessage=e=>{ue.commit("appendDeBugMsg",e.data)},l.onclose=()=>{e.value=!1,n.value="调试已关闭!",o.value=!0,ue.commit("appendDeBugMsg","调试已关闭!")}}))};return(0,r.bv)((()=>{document.onkeydown=e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&v(),(e.ctrlKey||e.metaKey)&&"s"===e.key&&(w(),e.preventDefault()),e.shiftKey&&"R"===e.key&&g(),e.shiftKey&&"C"===e.key&&p(),e.ctrlKey&&"e"===e.key&&(u(),e.preventDefault()),e.shiftKey&&"e"===e.key&&(d(),e.preventDefault()),e.shiftKey&&"P"===e.key&&c(),e.ctrlKey&&"p"===e.key&&(s(),e.preventDefault())}})),{debug:v,push:s,pull:c,clearEdit:p,showLoading:e,changeShow:a,warnShow:t,successText:n,changeSuccessShow:l,successShow:o,undo:h,redo:g,conver2Tab:u,conver2Source:d,warnText:i,saveSource:w}}};const Ke=(0,c.Z)(Te,[["render",te],["__scopeId","data-v-5c287c97"]]);var je=Ke;const Be={class:"out"};function Ae(e,t,n,o,i,a){return(0,r.wg)(),(0,r.iD)("div",Be,[(0,r._)("ul",null,[(0,r._)("li",{class:(0,h.C_)("editTab"===e.current_tab?"active":""),onClick:t[0]||(t[0]=e=>o.handleSetActive("editTab"))}," 编辑源 ",2),(0,r._)("li",{class:(0,h.C_)("editDebug"===e.current_tab?"active":""),onClick:t[1]||(t[1]=e=>o.handleSetActive("editDebug"))}," 调试源 ",2),(0,r._)("li",{class:(0,h.C_)("editList"===e.current_tab?"active":""),onClick:t[2]||(t[2]=e=>o.handleSetActive("editList"))}," 源列表 ",2),(0,r._)("li",{class:(0,h.C_)("editHelp"===e.current_tab?"active":""),onClick:t[3]||(t[3]=e=>o.handleSetActive("editHelp"))}," 帮助信息 ",2)]),((0,r.wg)(),(0,r.j4)(r.Ob,null,[((0,r.wg)(),(0,r.j4)((0,r.LL)(e.current_tab)))],1024))])}function Ee(e,t,n,i,a,l){return(0,r.wy)(((0,r.wg)(),(0,r.iD)("textarea",{placeholder:"这里输出序列化的JSON数据,可直接导入'阅读'APP","onUpdate:modelValue":t[0]||(t[0]=t=>e.source=t),onInput:t[1]||(t[1]=(...e)=>i.updateEditSource&&i.updateEditSource(...e))},null,544)),[[o.nr,e.source]])}var Le={name:"editTab",setup(){const e=(0,D.qj)({source:""}),t=()=>{ue.commit("changeEditTabSource",JSON.parse(e.source))};return(0,r.m0)((()=>{let t=ue.state.editTabSource;Object.keys(t).length>0?(t.lastUpdateTime=(new Date).getTime(),e.source=JSON.stringify(t,null,4)):e.source=""})),{...(0,D.BK)(e),updateEditSource:t}}};const He=(0,c.Z)(Le,[["render",Ee],["__scopeId","data-v-554d8227"]]);var Re=He;function Ne(e,t,n,i,a,l){return(0,r.wg)(),(0,r.iD)(r.HY,null,[i.isBookSource?(0,r.wy)(((0,r.wg)(),(0,r.iD)("input",{key:0,type:"text",style:{"text-align":"center",border:"1px solid #dddddd","border-radius":"4px"},placeholder:"输入搜索关键字,默认搜「我的」","onUpdate:modelValue":t[0]||(t[0]=t=>e.searchKey=t),onInput:t[1]||(t[1]=t=>i.changeSearch(e.searchKey)),onKeydown:t[2]||(t[2]=(0,o.D2)(((...e)=>i.startSearch&&i.startSearch(...e)),["enter"])),title:"输入关键词 enter(回车键)快捷搜索"},null,544)),[[o.nr,e.searchKey]]):(0,r.kq)("",!0),(0,r.wy)((0,r._)("textarea",{placeholder:"这里用于输出调试信息","onUpdate:modelValue":t[3]||(t[3]=t=>e.printDebug=t),ref:"textareaDom",id:"debug_text"},null,512),[[o.nr,e.printDebug]])],64)}var Oe={name:"editDebug",setup(){const e=(0,D.iH)(""),t=(0,D.qj)({printDebug:ue.state.deBugMsg,searchKey:""}),n=e=>{ue.commit("changeSearchKey",e)};(0,r.m0)((()=>{t.printDebug=ue.state.deBugMsg}));const o=()=>{document.querySelectorAll(".menu>button")[6].click()},i=(0,r.Fl)((()=>/bookSource/.test(window.location.href)));return{...(0,D.BK)(t),textareaDom:e,changeSearch:n,startSearch:o,isBookSource:i}}};const Je=(0,c.Z)(Oe,[["render",Ne],["__scopeId","data-v-28b882dd"]]);var qe=Je;const We={style:{display:"flex","flex-flow":"column"}},Ze={class:"tool"},Pe={class:"source_list"},$e=["value"],Me={class:"book_index"},Ye=["onClick"],Ve={class:"book_info"},ze={key:0};function Fe(e,t,n,i,a,l){return(0,r.wg)(),(0,r.iD)("div",We,[(0,r.wy)((0,r._)("input",{class:"search",type:"text",placeholder:"输入筛选关键词(源名称、源URL或源分组)输入自动筛选源","onUpdate:modelValue":t[0]||(t[0]=t=>e.searchKey=t),onFocus:t[1]||(t[1]=t=>e.delArr=[])},null,544),[[o.nr,e.searchKey]]),(0,r._)("div",null,[(0,r._)("div",Ze,[(0,r._)("button",{onClick:t[2]||(t[2]=(...e)=>i.upFile&&i.upFile(...e))},"导入书源文件"),(0,r._)("button",{onClick:t[3]||(t[3]=(...e)=>i.outExport&&i.outExport(...e))},"导出书源文件"),(0,r._)("button",{onClick:t[4]||(t[4]=(...e)=>i.deleteActiveSource&&i.deleteActiveSource(...e))},"删除选中源"),(0,r._)("button",{onClick:t[5]||(t[5]=(...e)=>i.clearAllSources&&i.clearAllSources(...e))},"清空列表")]),(0,r._)("div",Pe,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.filtedSources,((n,a)=>((0,r.wg)(),(0,r.iD)("div",{key:n.bookSourceUrl||n.sourceUrl,class:(0,h.C_)(["book_item",a===i.currentActive?"book_active":""])},[(0,r.wy)((0,r._)("input",{type:"checkbox",value:a,"onUpdate:modelValue":t[6]||(t[6]=t=>e.delArr=t)},null,8,$e),[[o.e8,e.delArr]]),(0,r._)("div",Me,(0,h.zw)(a+1),1),(0,r._)("div",{style:{"margin-left":"10px",flex:"1"},onClick:e=>i.handleItemClick(a)},[(0,r._)("div",Ve,[(0,r._)("span",null,(0,h.zw)(n.bookSourceName||n.sourceName),1),i.isBookSource?((0,r.wg)(),(0,r.iD)("span",ze,"最后修改:"+(0,h.zw)(i.formatTime(n.lastUpdateTime)),1)):(0,r.kq)("",!0),(0,r._)("span",null,"分组:"+(0,h.zw)(n.bookSourceGroup||n.sourceGroup||"无分组"),1)]),(0,r._)("div",null,(0,h.zw)(n.bookSourceUrl||n.sourceUrl),1)],8,Ye)],2)))),128))])])])}var Ge={name:"editList",setup(){let e=(0,D.qj)({searchKey:"",delArr:[],sources:[],filtedSources:[]}),t=(0,D.iH)(null);const n=n=>{t.value=n,ue.commit("clearEdit"),ue.commit("changeCurrentSource",e.filtedSources[n])},o=()=>{ue.commit("clearAllSource")},i=e=>{if(!e)return null;const t=new Date(e),n=t.getFullYear();let o=t.getMonth()+1;o=o<10?"0"+o:o;let r=t.getDate();r=r<10?"0"+r:r;let i=t.getHours();i=i<10?"0"+i:i;let a=t.getMinutes();a=a<10?"0"+a:a;let l=t.getSeconds();return l=l<10?"0"+l:l,n+"-"+o+"-"+r+" "+i+":"+a+":"+l},a=(t,n)=>{if(""===n)return e.sources;let o=/bookSource/.test(location.href);return o?t.filter((e=>e.bookSourceName.toUpperCase().includes(n.toUpperCase())||(e.bookSourceGroup||"").toUpperCase().includes(n.toUpperCase())||e.bookSourceUrl.toUpperCase().includes(n.toUpperCase()))):t.filter((e=>e.sourceName.toUpperCase().includes(n.toUpperCase())||(e.sourceGroup||"").toUpperCase().includes(n.toUpperCase())||e.sourceUrl.toUpperCase().includes(n.toUpperCase())))};(0,r.m0)((()=>{const t=/bookSource/.test(location.href),n=t?ue.state.bookSources:ue.state.rssSources;e.sources=n})),(0,r.m0)((()=>{e.filtedSources=a(e.sources,e.searchKey)}));const l=(0,r.Fl)((()=>/bookSource/.test(window.location.href))),c=()=>{if(0===e.delArr.length)return console.log("没有选中的书源"),!1;const t=[];e.delArr.forEach((n=>{t.push(e.filtedSources[n])})),ce(t).then((t=>{t.isSuccess?(console.log("删除成功"),e.delArr.forEach((t=>{let[n]=e.filtedSources.splice(t,1),o=e.sources.indexOf(n);e.sources.splice(o,1)})),e.delArr=[]):console.log("错误",t)}))},s=()=>{const e=document.createElement("input");e.type="file",e.accept=".json",e.addEventListener("change",(e=>{const t=e.target.files[0];var n=new FileReader;n.readAsText(t),n.onload=()=>{const e=JSON.parse(n.result);ue.commit("saveSources",e)}})),e.click()},u=()=>{const e=document.createElement("a");let t=/bookSource/.test(location.href),n=t?ue.state.bookSources:ue.state.rssSources,o=t?"BookSource":"RssSource";e.download=`${o}_${Date().replace(/.*?\s(\d+)\s(\d+)\s(\d+:\d+:\d+).*/,"$2$1$3").replace(/:/g,"")}.json`;let r=new Blob([JSON.stringify(n,null,4)],{type:"application/json"});e.href=window.URL.createObjectURL(r),e.click()};return{currentActive:t,isBookSource:l,deleteActiveSource:c,handleItemClick:n,...(0,D.BK)(e),formatTime:i,clearAllSources:o,upFile:s,outExport:u}}};const Qe=(0,c.Z)(Ge,[["render",Fe],["__scopeId","data-v-5570960e"]]);var Xe=Qe;const et=(0,r.uE)('书源制作教程xpath基础教程xpath高级教程正则表达式教程正则表达式在线验证工具
^$()[]{}.?+*| 这些是Java正则特殊符号,匹配需转义
(?s) 前缀表示跨行解析
(?m) 前缀表示逐行匹配
(?i) 前缀表示忽略大小写
',6);function tt(e,t,n,o,r,i){return et}var nt={name:"editHelp"};const ot=(0,c.Z)(nt,[["render",tt],["__scopeId","data-v-7ac1e65e"]]);var rt=ot,it={name:"editOut",components:{editDebug:qe,editTab:Re,editList:Xe,editHelp:rt},setup(){const e=(0,D.qj)({url:localStorage.getItem("url")||"",current_tab:ue.state.currentTab||"editTab"}),t=e=>{ue.commit("changeTabName",e)},n=e=>{ue.commit("changeUrl",e)};(0,r.m0)((()=>{e.current_tab=ue.state.currentTab}));const o=()=>{document.querySelectorAll(".menu>button")[1].click()};return{...(0,D.BK)(e),handleSetActive:t,changInput:n,pullSource:o}}};const at=(0,c.Z)(it,[["render",Ae]]);var lt=at,ct={components:{editMenu:je,editOut:lt},setup(){const e=(0,D.qj)({});return(0,r.bv)((()=>{})),{...(0,D.BK)(e)}}};const st=(0,c.Z)(ct,[["render",y],["__scopeId","data-v-0fc56f5e"]]);var ut=st;const dt={class:"main"};function ht(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",dt,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}const pt=e=>((0,r.dD)("data-v-2ede5ef6"),e=e(),(0,r.Cn)(),e),gt={class:"edit_input"},wt=pt((()=>(0,r._)("i",null,":",-1))),vt=["id","placeholder","rows","value"];function mt(e,t,n,o,i,a){return(0,r.wg)(),(0,r.iD)("div",gt,[(0,r._)("span",null,[(0,r.Uk)((0,h.zw)(n.title),1),wt]),(0,r._)("textarea",{id:n.type,placeholder:n.hint,rows:n.rows,value:n.content,ref:"attr",onInput:t[0]||(t[0]=(...e)=>o.change&&o.change(...e)),onBlur:t[1]||(t[1]=(...e)=>o.changeHistory&&o.changeHistory(...e)),onFocus:t[2]||(t[2]=(...e)=>o.changeHeight&&o.changeHeight(...e))},null,40,vt)])}var St={props:{title:{type:String,default:""},rows:{type:Number,default:1},hint:{type:String,default:""},type:{type:String,default:""},content:{type:[String,Number,Boolean],default:""}},emits:["changeContent"],setup(e,{emit:t}){const n=(0,D.iH)(""),o=()=>{t("changeContent",{value:n.value.value,type:n.value.getAttribute("id")})},i=()=>{localStorage.getItem("history")||localStorage.setItem("history",JSON.stringify({new:[],old:[]}));const e=JSON.parse(localStorage.getItem("history")),t=e.new;if(t.length){const e=n.value.getAttribute("id");if(e.includes("_")||t[t.length-1][e]===ue.state.currentSource[e]){if(e.includes("_")){let n=e.split("_")[0],o=e.split("_")[1];t[t.length-1][n][o]!==ue.state.currentSource[n][o]&&ue.commit("editHistory",ue.state.currentSource)}}else ue.commit("editHistory",ue.state.currentSource)}else ue.commit("editHistory",ue.state.currentSource)},a=()=>{(0,r.Y3)((()=>{let e=n.value;const t=e.scrollHeight,o=e.offsetHeight;o<=t&&(e.style.height="auto",e.style.height=e.scrollHeight+"px")}))};return{changeHistory:i,change:o,attr:n,changeHeight:a}}};const ft=(0,c.Z)(St,[["render",mt],["__scopeId","data-v-2ede5ef6"]]);var bt=ft,Ct={base:[{title:"源域名",rows:1,id:"bookSourceUrl",hint:"<必填>通常填写网站主页,例: https://www.qidian.com"},{title:"源类型",rows:1,id:"bookSourceType",hint:"<必填>0:文本 1:音频 2:图片 3:文件(只提供下载的网站)"},{title:"源名称",rows:1,id:"bookSourceName",hint:"<必填>会显示在源列表"},{title:"源分组",rows:1,id:"bookSourceGroup",hint:"<选填>描述源的特征信息"},{title:"源注释",rows:1,id:"bookSourceComment",hint:"<选填>描述源作者和状态"},{title:"书源变量说明",rows:1,id:"variableComment",hint:"<选填>书源变量说明"},{title:"登录地址",rows:1,id:"loginUrl",hint:"<选填>填写网站登录网址,仅在需要登录的源有用"},{title:"登录界面",rows:3,id:"loginUi",hint:"<选填>自定义登录界面"},{title:"登录检测",rows:3,id:"loginCheckJs",hint:"<选填>登录检测js"},{title:"并发率",rows:1,id:"concurrentRate",hint:"<选填>并发率"},{title:"请求头",rows:3,id:"header",hint:"<选填>客户端标识"},{title:"链接验证",rows:1,id:"bookUrlPattern",hint:"<选填>当详情页URL与源URL的域名不一致时有效,用于添加网址"}],search:[{title:"搜索地址",rows:1,id:"searchUrl",hint:"[域名可省略]/search.php@kw={{key}}"},{title:"校验文字",rows:1,id:"ruleSearch_checkKeyWord",hint:"校验关键字"},{title:"列表规则",rows:1,id:"ruleSearch_bookList",hint:"选择书籍节点 (规则结果为List)"},{title:"书名规则",rows:1,id:"ruleSearch_name",hint:"选择节点书名 (规则结果为String)"},{title:"作者规则",rows:1,id:"ruleSearch_author",hint:"选择节点作者 (规则结果为String)"},{title:"分类规则",rows:1,id:"ruleSearch_kind",hint:"选择节点分类信息 (规则结果为String)"},{title:"字数规则",rows:1,id:"ruleSearch_wordCount",hint:"选择节点字数信息 (规则结果为String)"},{title:"最新章节",rows:1,id:"ruleSearch_lastChapter",hint:"选择节点最新章节 (规则结果为String)"},{title:"简介规则",rows:1,id:"ruleSearch_intro",hint:"选择节点书籍简介 (规则结果为String)"},{title:"封面规则",rows:1,id:"ruleSearch_coverUrl",hint:"选择节点书籍封面 (规则结果为String类型的url)"},{title:"详情地址",rows:1,id:"ruleSearch_bookUrl",hint:"选择书籍详情页网址 (规则结果为String类型的url)"}],find:[{title:"发现地址",rows:6,id:"exploreUrl",hint:"内容能显示在发现菜单\n每行一条发现分类(网址域名可省略),例:\n名称1::网址(Url)1\n名称2::网址(Url)2\n..."},{title:"列表规则",rows:1,id:"ruleExplore_bookList",hint:"选择书籍节点 (规则结果为List)"},{title:"书名规则",rows:1,id:"ruleExplore_name",hint:"选择节点书名 (规则结果为String)"},{title:"作者规则",rows:1,id:"ruleExplore_author",hint:"选择节点作者 (规则结果为String)"},{title:"分类规则",rows:1,id:"ruleExplore_kind",hint:"选择节点分类信息 (规则结果为String)"},{title:"字数规则",rows:1,id:"ruleExplore_wordCount",hint:"选择节点字数信息 (规则结果为String)"},{title:"最新章节",rows:1,id:"ruleExplore_lastChapter",hint:"选择节点最新章节 (规则结果为String)"},{title:"简介规则",rows:1,id:"ruleExplore_intro",hint:"选择节点书籍简介 (规则结果为String)"},{title:"封面规则",rows:1,id:"ruleExplore_coverUrl",hint:"选择节点书籍封面 (规则结果为String类型的url)"},{title:"详情地址",rows:1,id:"ruleExplore_bookUrl",hint:"选择书籍详情页网址 (规则结果为String类型的url)"}],detail:[{title:"预处理",rows:3,id:"ruleBookInfo_init",hint:"用于加速详情信息检索,只支持AllInOne规则"},{title:"书名规则",rows:1,id:"ruleBookInfo_name",hint:"选择节点书名 (规则结果为String)"},{title:"作者规则",rows:1,id:"ruleBookInfo_author",hint:"选择节点作者 (规则结果为String)"},{title:"分类规则",rows:1,id:"ruleBookInfo_kind",hint:"选择节点分类信息 (规则结果为String)"},{title:"字数规则",rows:1,id:"ruleBookInfo_wordCount",hint:"选择节点字数信息 (规则结果为String)"},{title:"最新章节",rows:1,id:"ruleBookInfo_lastChapter",hint:"选择节点最新章节 (规则结果为String)"},{title:"简介规则",rows:1,id:"ruleBookInfo_intro",hint:"选择节点书籍简介 (规则结果为String)"},{title:"封面规则",rows:1,id:"ruleBookInfo_coverUrl",hint:"选择节点书籍封面 (规则结果为String类型的url)"},{title:"目录地址",rows:1,id:"ruleBookInfo_tocUrl",hint:"选择书籍详情页网址 (规则结果为String类型的url, 与详情页相同时可省略)"},{title:"下载URL",rows:1,id:"ruleBookInfo_downloadUrls",hint:"文件类书源下载地址 (规则结果为String类型的url, 多个链接返回数组)"},{title:"允许修改书名作者",rows:1,id:"ruleBookInfo_canReName",hint:"允许修改书名作者(规则结果为String类型, 默认不允许)"}],directory:[{title:"更新前JS",rows:3,id:"ruleToc_preUpdateJs",hint:"动态更新书籍目录链接"},{title:"列表规则",rows:3,id:"ruleToc_chapterList",hint:"选择目录列表的章节节点 (规则结果为List)"},{title:"章节名称",rows:1,id:"ruleToc_chapterName",hint:"选择章节名称 (规则结果为String)"},{title:"章节地址",rows:1,id:"ruleToc_chapterUrl",hint:"选择章节链接 (规则结果为String类型的Url)"},{title:"卷名标识",rows:1,id:"ruleToc_isVolume",hint:"章节名称是否是卷名 (规则结果为Bool)"},{title:"收费标识",rows:1,id:"ruleToc_isVip",hint:"章节是否为VIP章节 (规则结果为Bool)"},{title:"购买标识",rows:1,id:"ruleToc_isPay",hint:"章节是否为已购买 (规则结果为Bool)"},{title:"章节信息",rows:1,id:"ruleToc_updateTime",hint:"选择章节信息 (规则结果为String)"},{title:"翻页规则",rows:1,id:"ruleToc_nextTocUrl",hint:"选择目录下一页链接 (规则结果为List或String)"}],content:[{title:"脚本注入",rows:3,id:"ruleContent_webJs",hint:"注入javascript,用于模拟鼠标点击等,必须有返回值,一般为String类型"},{title:"正文规则",rows:1,id:"ruleContent_content",hint:"选择正文内容 (规则结果为String)"},{title:"翻页规则",rows:1,id:"ruleContent_nextContentUrl",hint:"选择下一分页(不是下一章)链接 (规则结果为String类型的Url)"},{title:"资源正则",rows:1,id:"ruleContent_sourceRegex",hint:"匹配资源的url特征,用于嗅探"},{title:"替换规则",rows:1,id:"ruleContent_replaceRegex",hint:"多页内容合并后替换,用于正文净化"},{title:"图片样式",rows:1,id:"ruleContent_imageStyle",hint:"FULL:铺满 不填:默认样式"},{title:"购买操作",rows:1,id:"ruleContent_payAction",hint:"填写JavaScript 返回购买链接或者调用购买接口"},{title:"图片解密",rows:1,id:"ruleContent_imageDecode",hint:"填写JavaScript 返回解密图片的bytes "}],review:[{title:"段评URL",rows:1,id:"ruleReview_reviewUrl",hint:"段评URL"},{title:"段评发布者头像",rows:1,id:"ruleReview_avatarRule",hint:"段评发布者头像"},{title:"段评内容",rows:1,id:"ruleReview_contentRule",hint:"段评内容"},{title:"段评发布时间",rows:1,id:"ruleReview_postTimeRule",hint:"段评发布时间"},{title:"获取段评回复URL",rows:1,id:"ruleReview_reviewQuoteUrl",hint:"获取段评回复URL"},{title:"点赞URL",rows:1,id:"ruleReview_voteUpUrl",hint:"点赞URL"},{title:"点踩URL",rows:1,id:"ruleReview_voteDownUrl",hint:"点踩URL"},{title:"发送回复URL",rows:1,id:"ruleReview_postReviewUrl",hint:"发送回复URL"},{title:"发送回复段评URL",rows:1,id:"ruleReview_postQuoteUrl",hint:"发送回复段评URL"},{title:"删除段评URL",rows:1,id:"ruleReview_deleteUrl",hint:"删除段评URL"}],other:[{title:"启用搜索",rows:1,id:"enabled",hint:"启用: true 关闭: false (可选,默认true)"},{title:"启用发现",rows:1,id:"enabledExplore",hint:"启用: true 关闭: false (可选,默认true)"},{title:"启用段评",rows:1,id:"enabledReview",hint:"启用: true 关闭: false (可选,默认false)"},{title:"启用CookieJar",rows:1,id:"enabledCookieJar",hint:"启用: true 关闭: false (可选,默认false)"},{title:"搜索权重",rows:1,id:"weight",hint:"整数: 0~N (可选,默认0) | 数字越大越靠前"},{title:"排序编号",rows:1,id:"customOrder",hint:"整数: 0~N (可选,默认0) | 数字越小越靠前"}]};function _t(){const e=(0,D.qj)({currentSource:ue.state.currentSource}),t=e=>{ue.commit("changeCurrentSourceValue",e)},n=t=>{try{if(t.includes("_")){let n=t.split("_")[0],o=t.split("_")[1],r=e.currentSource[n];return r?r[o]:null}return e.currentSource[t]}catch(n){console.log("导入错误",n.TypeError),ue.commit("clearEdit")}};return(0,r.m0)((()=>{e.currentSource=ue.state.currentSource})),{...(0,D.BK)(e),upData:t,getContent:n}}var kt={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.base});return{...(0,D.BK)(n),upData:e,getContent:t}}};const yt=(0,c.Z)(kt,[["render",ht]]);var Dt=yt;const Ut={class:"main"};function It(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Ut,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var xt={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.search});return{...(0,D.BK)(n),upData:e,getContent:t}}};const Tt=(0,c.Z)(xt,[["render",It]]);var Kt=Tt;const jt={class:"main"};function Bt(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",jt,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var At={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.directory});return{...(0,D.BK)(n),upData:e,getContent:t}}};const Et=(0,c.Z)(At,[["render",Bt]]);var Lt=Et;const Ht={class:"main"};function Rt(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Ht,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Nt={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.content});return{...(0,D.BK)(n),upData:e,getContent:t}}};const Ot=(0,c.Z)(Nt,[["render",Rt]]);var Jt=Ot;const qt={class:"main"};function Wt(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",qt,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Zt={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.detail});return{...(0,D.BK)(n),upData:e,getContent:t}}};const Pt=(0,c.Z)(Zt,[["render",Wt]]);var $t=Pt;const Mt={class:"main"};function Yt(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Mt,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Vt={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.other});return{...(0,D.BK)(n),upData:e,getContent:t}}};const zt=(0,c.Z)(Vt,[["render",Yt]]);var Ft=zt;const Gt={class:"main"};function Qt(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Gt,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Xt={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.find});return{...(0,D.BK)(n),upData:e,getContent:t}}};const en=(0,c.Z)(Xt,[["render",Qt]]);var tn=en;const nn={class:"main"};function on(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",nn,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var rn={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.review});return{...(0,D.BK)(n),upData:e,getContent:t}}};const an=(0,c.Z)(rn,[["render",on]]);var ln=an;const cn=e=>((0,r.dD)("data-v-63af33ef"),e=e(),(0,r.Cn)(),e),sn={class:"left"},un=cn((()=>(0,r._)("div",null,[(0,r._)("a",{href:"/"},"←主页"),(0,r._)("b",null,"订阅源")],-1))),dn=["onClick"],hn=["onClick"],pn=["onClick"],gn=["onClick"];function wn(e,t,n,o,i,a){const l=(0,r.up)("router-link"),c=(0,r.up)("router-view"),s=(0,r.up)("edit-menu"),u=(0,r.up)("edit-out");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r._)("div",sn,[(0,r._)("div",null,[un,(0,r._)("ul",null,[(0,r.Wm)(l,{to:{name:"rss-base"},custom:""},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 基础 ",10,dn)])),_:1}),(0,r.Wm)(l,{to:{name:"rss-list"},custom:""},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 列表 ",10,hn)])),_:1}),(0,r.Wm)(l,{to:{name:"rss-webView"},custom:""},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," WebView ",10,pn)])),_:1}),(0,r.Wm)(l,{custom:"",to:{name:"rss-other"}},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 其他 ",10,gn)])),_:1})])]),(0,r.Wm)(c,null,{default:(0,r.w5)((({Component:e})=>[((0,r.wg)(),(0,r.j4)(r.Ob,null,[((0,r.wg)(),(0,r.j4)((0,r.LL)(e)))],1024))])),_:1})]),(0,r.Wm)(s),(0,r.Wm)(u)],64)}var vn={components:{editMenu:je,editOut:lt},setup(){const e=(0,D.qj)({});return(0,r.bv)((()=>{})),{...(0,D.BK)(e)}}};const mn=(0,c.Z)(vn,[["render",wn],["__scopeId","data-v-63af33ef"]]);var Sn=mn;const fn={class:"main"};function bn(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",fn,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Cn={base:[{title:"源域名",rows:1,id:"sourceUrl",hint:"<必填>通常填写网站主页,例: https://www.qidian.com"},{title:"图标",rows:1,id:"sourceIcon",hint:"<选填>填写图片网络链接"},{title:"源名称",rows:1,id:"sourceName",hint:"<必填>会显示在源列表"},{title:"源分组",rows:1,id:"sourceGroup",hint:"<选填>描述源的特征信息"},{title:"源注释",rows:1,id:"sourceComment",hint:"<选填>描述源作者和状态"},{title:"源变量说明",rows:1,id:"variableComment",hint:"<选填>源变量说明"},{title:"登录地址",rows:1,id:"loginUrl",hint:"<选填>填写网站登录网址,仅在需要登录的源有用"},{title:"登录界面",rows:3,id:"loginUi",hint:"<选填>自定义登录界面"},{title:"登录检测",rows:3,id:"loginCheckJs",hint:"<选填>登录检测js"},{title:"并发率",rows:1,id:"concurrentRate",hint:"<选填>并发率"},{title:"请求头",rows:3,id:"header",hint:"<选填>客户端标识"},{title:"分类地址",rows:3,id:"sortUrl",hint:"<选填>名称1::链接1\n名称2::链接2"}],list:[{title:"列表样式",rows:1,id:"articleStyle",hint:"<选填>0,1,2 (默认0)"},{title:"列表规则",rows:1,id:"ruleArticles",hint:"规则结果为List"},{title:"翻页规则",rows:1,id:"ruleNextPage",hint:"下一页链接 规则结果为List或String"},{title:"标题规则",rows:1,id:"ruleTitle",hint:"文章标题 规则结果为String"},{title:"时间规则",rows:1,id:"rulePubDate",hint:"文章发布时间 规则结果为String"},{title:"描述规则",rows:1,id:"ruleDescription",hint:"文章简要描述 规则结果为String"},{title:"图片规则",rows:1,id:"ruleImage",hint:"文章图片链接 规则结果为String"},{title:"链接规则",rows:1,id:"ruleLink",hint:"文章链接 规则结果为String"}],webView:[{title:"启用JS",rows:1,id:"enableJs",hint:"启用: true 关闭: false (可选,默认true)"},{title:"加载地址",rows:1,id:"loadWithBaseUrl",hint:"启用: true 关闭: false (可选,默认true)"},{title:"内容规则",rows:1,id:"ruleContent",hint:"文章正文"},{title:"样式规则",rows:3,id:"style",hint:"文章正文样式 填写css"}],other:[{title:"启用",rows:1,id:"enabled",hint:"启用: true 关闭: false (可选,默认true)"},{title:"启用CookieJar",rows:1,id:"enabledCookieJar",hint:"启用: true 关闭: false (可选,默认false)"},{title:"单URL",rows:1,id:"singleUrl",hint:"启用: true 关闭: false (可选,默认false)"},{title:"排序编号",rows:1,id:"customOrder",hint:"整数: 0~N (可选,默认0) | 数字越小越靠前"}]},_n={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Cn.base});return{...(0,D.BK)(n),upData:e,getContent:t}}};const kn=(0,c.Z)(_n,[["render",bn]]);var yn=kn;const Dn={class:"main"};function Un(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Dn,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var In={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Cn.list});return{...(0,D.BK)(n),upData:e,getContent:t}}};const xn=(0,c.Z)(In,[["render",Un]]);var Tn=xn;const Kn={class:"main"};function jn(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Kn,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Bn={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Cn.webView});return{...(0,D.BK)(n),upData:e,getContent:t}}};const An=(0,c.Z)(Bn,[["render",jn]]);var En=An;const Ln={class:"main"};function Hn(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Ln,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Rn={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Cn.other});return{...(0,D.BK)(n),upData:e,getContent:t}}};const Nn=(0,c.Z)(Rn,[["render",Hn]]);var On=Nn;const Jn=[{path:"/bookSource",name:"book-home",component:ut,redirect:{name:"book-base"},children:[{path:"/bookSource/base",name:"book-base",component:Dt},{path:"/bookSource/search",name:"book-search",component:Kt},{path:"/bookSource/find",name:"book-find",component:tn},{path:"/bookSource/detail",name:"book-detail",component:$t},{path:"/bookSource/directory",name:"book-directory",component:Lt},{path:"/bookSource/content",name:"book-content",component:Jt},{path:"/bookSource/review",name:"book-review",component:ln},{path:"/bookSource/other",name:"book-other",component:Ft}]},{path:"/rssSource",name:"rss-home",component:Sn,redirect:{name:"rss-base"},children:[{path:"/rssSource/base",name:"rss-base",component:yn},{path:"/rssSource/list",name:"rss-list",component:Tn},{path:"/rssSource/webView",name:"rss-webView",component:En},{path:"/rssSource/other",name:"rss-other",component:On}]}],qn=(0,d.p7)({history:(0,d.r5)(),routes:Jn});var Wn=qn;(0,o.ri)(u).use(ue).use(Wn).mount("#app")}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.m=e,function(){var e=[];n.O=function(t,o,r,i){if(!o){var a=1/0;for(u=0;u=i)&&Object.keys(n.O).every((function(e){return n.O[e](o[c])}))?o.splice(c--,1):(l=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[o,r,i]}}(),function(){n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={143:0};n.O.j=function(t){return 0===e[t]};var t=function(t,o){var r,i,a=o[0],l=o[1],c=o[2],s=0;if(a.some((function(t){return 0!==e[t]}))){for(r in l)n.o(l,r)&&(n.m[r]=l[r]);if(c)var u=c(n)}for(t&&t(o);s((0,r.dD)("data-v-0fc56f5e"),e=e(),(0,r.Cn)(),e),g={class:"left"},w=p((()=>(0,r._)("div",null,[(0,r._)("a",{href:"/"},"←主页"),(0,r._)("b",null,"书源")],-1))),v=["onClick"],m=["onClick"],S=["onClick"],f=["onClick"],b=["onClick"],C=["onClick"],_=["onClick"],k=["onClick"];function y(e,t,n,o,i,a){const l=(0,r.up)("router-link"),c=(0,r.up)("router-view"),s=(0,r.up)("edit-menu"),u=(0,r.up)("edit-out");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r._)("div",g,[(0,r._)("div",null,[w,(0,r._)("ul",null,[(0,r.Wm)(l,{to:{name:"book-base"},custom:""},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 基础 ",10,v)])),_:1}),(0,r.Wm)(l,{to:{name:"book-search"},custom:""},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 搜索 ",10,m)])),_:1}),(0,r.Wm)(l,{to:{name:"book-find"},custom:""},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 发现 ",10,S)])),_:1}),(0,r.Wm)(l,{custom:"",to:{name:"book-detail"}},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 详情 ",10,f)])),_:1}),(0,r.Wm)(l,{custom:"",to:{name:"book-directory"}},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 目录 ",10,b)])),_:1}),(0,r.Wm)(l,{custom:"",to:{name:"book-content"}},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 正文 ",10,C)])),_:1}),(0,r.Wm)(l,{custom:"",to:{name:"book-review"}},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 段评 ",10,_)])),_:1}),(0,r.Wm)(l,{custom:"",to:{name:"book-other"}},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 其他 ",10,k)])),_:1})])]),(0,r.Wm)(c,null,{default:(0,r.w5)((({Component:e})=>[((0,r.wg)(),(0,r.j4)(r.Ob,null,[((0,r.wg)(),(0,r.j4)((0,r.LL)(e)))],1024))])),_:1})]),(0,r.Wm)(s),(0,r.Wm)(u)],64)}var D=n(2262);n(7658);const U=e=>((0,r.dD)("data-v-5c287c97"),e=e(),(0,r.Cn)(),e),I={class:"menu"},x=(0,r.Uk)("⇈推送源 "),T=U((()=>(0,r._)("span",null,"Ctrl+P",-1))),j=[x,T],K=(0,r.Uk)("⇊拉取源 "),B=U((()=>(0,r._)("span",null,"Shift+P",-1))),A=[K,B],E=(0,r.Uk)(" ⋙生成源"),L=U((()=>(0,r._)("span",null,"Ctrl+E",-1))),H=[E,L],R=(0,r.Uk)(" ⋘编辑源"),N=U((()=>(0,r._)("span",null,"Shift+E",-1))),O=[R,N],J=(0,r.Uk)(" ✗清空表单"),q=U((()=>(0,r._)("span",null,"Shift+C",-1))),W=[J,q],Z=(0,r.Uk)("↶撤销操作"),P=U((()=>(0,r._)("span",null,"Ctrl+Z",-1))),$=[Z,P],M=(0,r.Uk)("↷重做操作"),Y=U((()=>(0,r._)("span",null,"Shift+R",-1))),V=[M,Y],z=(0,r.Uk)(" ⇏调试源 "),F=U((()=>(0,r._)("span",null,"Ctrl+Enter",-1))),G=[z,F],Q=(0,r.Uk)(" ✓保存源"),X=U((()=>(0,r._)("span",null,"Ctrl+S",-1))),ee=[Q,X];function te(e,t,n,o,i,a){const l=(0,r.up)("edit-loading"),c=(0,r.up)("edit-warn"),s=(0,r.up)("edit-success");return(0,r.wg)(),(0,r.iD)("div",I,[(0,r._)("div",null,[o.showLoading?((0,r.wg)(),(0,r.j4)(l,{key:0})):(0,r.kq)("",!0),(0,r.Wm)(c,{text:o.warnText,"is-show":o.warnShow,onChangeShow:o.changeShow},null,8,["text","is-show","onChangeShow"]),o.successShow?((0,r.wg)(),(0,r.j4)(s,{key:1,isShow:o.successShow,onChangeShow:o.changeSuccessShow,text:o.successText},null,8,["isShow","onChangeShow","text"])):(0,r.kq)("",!0)]),(0,r._)("button",{onClick:t[0]||(t[0]=(...e)=>o.push&&o.push(...e)),title:"Ctrl+P"},j),(0,r._)("button",{onClick:t[1]||(t[1]=(...e)=>o.pull&&o.pull(...e)),title:"Shift+P"},A),(0,r._)("button",{onClick:t[2]||(t[2]=(...e)=>o.conver2Tab&&o.conver2Tab(...e)),title:"Ctrl+E"},H),(0,r._)("button",{onClick:t[3]||(t[3]=(...e)=>o.conver2Source&&o.conver2Source(...e)),title:"Shift+E"},O),(0,r._)("button",{onClick:t[4]||(t[4]=(...e)=>o.clearEdit&&o.clearEdit(...e)),title:"Shift+C"},W),(0,r._)("button",{onClick:t[5]||(t[5]=(...e)=>o.undo&&o.undo(...e)),title:"Ctrl+Z"},$),(0,r._)("button",{onClick:t[6]||(t[6]=(...e)=>o.redo&&o.redo(...e)),title:"Shift+R"},V),(0,r._)("button",{onClick:t[7]||(t[7]=(...e)=>o.debug&&o.debug(...e)),title:"Ctrl+Enter"},G),(0,r._)("button",{onClick:t[8]||(t[8]=(...e)=>o.saveSource&&o.saveSource(...e)),title:"Ctrl+S"},ee)])}function ne(e,t){return fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then((e=>e.json()))}function oe(e){return fetch(e).then((e=>e.json()))}function re(e,t=!0){let n=/bookSource/.test(location.href),o=`http://${localStorage.getItem("url")||location.host}/`,r=n?"BookSource":"RssSource";return`${o}${e}${r}${t?"s":""}`}function ie(){return oe(re("get"))}function ae(e){return ne(re("save"),e)}function le(e){return ne(re("save",!1),e)}function ce(e){return ne(re("delete"),e)}var se=n(3907),ue=(0,se.MT)({state:{url:localStorage.getItem("url")||"",bookSources:[],rssSources:[],currentSource:{},currentTab:localStorage.getItem("tabName")||"editTab",editTabSource:{},deBugMsg:"",searchKey:""},getters:{},mutations:{changeSearchKey(e,t){e.searchKey=t},saveSources(e,t){/bookSource/.test(location.href)?e.bookSources=t:e.rssSources=t},saveCurrentSource(e){let t,n,o=e.currentSource;/bookSource/.test(location.href)?(o=e.bookSources,n="bookSourceUrl"):(o=e.rssSources,n="sourceUrl");let r=t.findIndex((e=>e[n]===o[n]));r>-1?t.splice(r,1,o):t.push(o)},changeCurrentSource(e,t){const n=JSON.stringify(t);e.currentSource=JSON.parse(n)},changeCurrentSourceValue(e,t){let n={true:!0,false:!1},o=n[t.value]||t.value;if(/\d+/.test(o)&&(o=parseInt(o)),t.type.includes("_")){let n=t.type.split("_")[0],r=t.type.split("_")[1],i={};i[r]=o,e.currentSource[n]=Object.assign(e.currentSource[n]||{},i)}else e.currentSource[t.type]=o;e.currentSource.lastUpdateTime=(new Date).getTime()},changeTabName(e,t){e.currentTab=t,localStorage.setItem("tabName",t),console.log(t)},changeEditTabSource(e,t){const n=JSON.stringify(t);e.editTabSource=JSON.parse(n)},editHistory(e,t){let n;if(localStorage.getItem("history"))n=JSON.parse(localStorage.getItem("history")),n.new.push(t),n.new.length>50&&n.new.shift(),n.old.length>50&&n.old.shift(),localStorage.setItem("history",JSON.stringify(n));else{const e={new:[t],old:[]};localStorage.setItem("history",JSON.stringify(e))}},editHistoryUndo(e){if(localStorage.getItem("history")){let t=JSON.parse(localStorage.getItem("history"));t.old.push(e.currentSource),t.new.length&&(e.currentSource=t.new.pop()),localStorage.setItem("history",JSON.stringify(t))}},clearAllHistory(){localStorage.setItem("history",JSON.stringify({new:[],old:[]}))},clearEdit(e){e.editTabSource={},e.currentSource={}},appendDeBugMsg(e,t){let n=document.querySelector("#debug_text");n.scrollTop=n.scrollHeight,e.deBugMsg+=t+"\n"},clearDeBugMsg(e){e.deBugMsg=""},clearAllSource(e){e.bookSources=[],e.rssSources=[]}},actions:{},modules:{}});const de=e=>((0,r.dD)("data-v-ab8a8a34"),e=e(),(0,r.Cn)(),e),he={class:"fixed"},pe=de((()=>(0,r._)("div",{class:"half-circle-spinner"},[(0,r._)("div",{class:"circle circle-1"}),(0,r._)("div",{class:"circle circle-2"})],-1))),ge=[pe];function we(e,t,n,o,i,a){return(0,r.wg)(),(0,r.iD)("div",he,ge)}var ve={name:"editLoading"};const me=(0,c.Z)(ve,[["render",we],["__scopeId","data-v-ab8a8a34"]]);var Se=me;const fe={key:0,class:"warm"};function be(e,t,n,o,i,a){return n.isShow?((0,r.wg)(),(0,r.iD)("div",fe,[(0,r._)("p",null,(0,h.zw)(n.text),1),(0,r._)("div",null,[(0,r._)("button",{onClick:t[0]||(t[0]=(...e)=>o.changeShow&&o.changeShow(...e))},"关闭")])])):(0,r.kq)("",!0)}var Ce={name:"editWarm",props:{isShow:{default:!1,type:Boolean},text:{type:String,default:""}},setup(e,{emit:t}){const n=()=>{t("changeShow",!e.isShow)};return{changeShow:n}}};const _e=(0,c.Z)(Ce,[["render",be],["__scopeId","data-v-27eae50d"]]);var ke=_e;const ye={class:"success"};function De(e,t,n,o,i,a){return(0,r.wg)(),(0,r.iD)("div",ye,[(0,r._)("p",null,(0,h.zw)(n.text),1)])}var Ue={props:{text:{type:String,default:""},isShow:{type:Boolean,default:!1}},emits:["changeShow"],setup(e,{emit:t}){return setTimeout((()=>{t("changeShow",!e.isShow)}),3e3),{}}};const Ie=(0,c.Z)(Ue,[["render",De],["__scopeId","data-v-bef92f74"]]);var xe=Ie,Te={components:{editLoading:Se,editWarn:ke,editSuccess:xe},setup(){const e=(0,D.iH)(!1),t=(0,D.iH)(!1),n=(0,D.iH)(""),o=(0,D.iH)(!1),i=(0,D.iH)(""),a=e=>{t.value=e},l=e=>{console.log(e),o.value=e},c=()=>{e.value=!0,ie().then((r=>{e.value=!1,r.isSuccess?(ue.commit("changeTabName","editList"),ue.commit("saveSources",r.data),n.value=`成功拉取${r.data.length}条源`,o.value=!0):(i.value=r.errorMsg,t.value=!0)})).catch((n=>{console.log(n),e.value=!1,i.value=" 请求发生了错误,请检查你的后端地址,填写是否正确,或者 阅读APP\n确认开启web服务",t.value=!0}))},s=()=>{n.value="正在推送中",o.value=!0,e.value=!0;let r=/bookSource/.test(location.href)?ue.state.bookSources:ue.state.rssSources;ae(r).then((a=>{if(a.isSuccess){let e=a.data;if(Array.isArray(e)){let t="";r.length>e.length&&(r.forEach((t=>{e.find((e=>e.bookSourceUrl===t.bookSourceUrl))||console.log(t.bookSourceUrl)})),t="\n推送失败的源将用红色字体标注!"),n.value=`批量推送源到「阅读3.0APP」\n共计: ${r.length} 条\n成功: ${e.length} 条\n失败: ${r.length-e.length} 条${t}`,o.value=!0}else n.value=`批量推送源到「阅读3.0APP」成功!\n共计: ${r.length} 条`,o.value=!0}else i.value=`批量推送源失败!\nErrorMsg: ${a.errorMsg}`,t.value=!0;e.value=!1})).catch((n=>{console.log(n),e.value=!1,t.value=!0,i.value="请求发生了错误,请检查你的后端地址,填写是否正确,或者 阅读APP\n确认开启web服务"}))},u=()=>{ue.commit("changeEditTabSource",ue.state.currentSource),ue.commit("changeTabName","editTab")},d=()=>{ue.commit("changeCurrentSource",ue.state.editTabSource)},h=()=>{ue.commit("editHistoryUndo")},p=()=>{ue.commit("clearEdit"),console.log("已清除"),n.value="已清除",o.value=!0},g=()=>{ue.commit("clearEdit"),ue.commit("clearAllHistory"),n.value="已清除所有历史记录",o.value=!0},w=()=>{let e=/bookSource/.test(location.href),r=ue.state.currentSource;e&&""!==r.bookSourceUrl&&""!==r.bookSourceType&&""!==r.bookSourceName||!e&&""!==r.sourceUrl&&""!==r.sourceName?le(r).then((a=>{a.isSuccess?(n.value=`源《${e?r.bookSourceName:r.sourceName}》已成功保存到「阅读3.0APP」`,o.value=!0,ue.commit("saveCurrentSource")):(i.value=`源《${e?r.bookSourceName:r.sourceName}》保存失败!\nErrorMsg: ${a.errorMsg}`,t.value=!0)})):(i.value="请检查<必填>项是否全部填写",t.value=!0)},v=()=>{e.value=!0,ue.commit("clearDeBugMsg"),ue.commit("changeTabName","editDebug");let t=/bookSource/.test(location.href),r=ue.state.currentSource;le(r).then((i=>{console.log(i);let a="ws://"+(localStorage.getItem("url")||location.host).replace(/\d+$/,(e=>parseInt(e)+1))+"/"+(t?"bookSourceDebug":"rssSourceDebug");console.log(a);const l=new WebSocket(a);let c="",s=t?r.bookSourceUrl:r.sourceUrl;t&&(c=r.ruleSearch.checkKeyWord?r.ruleSearch.checkKeyWord:ue.state.searchKey?ue.state.searchKey:"我的"),l.onopen=()=>{l.send(`{"tag":"${s}", "key":"${c}"}`)},l.onmessage=e=>{ue.commit("appendDeBugMsg",e.data)},l.onclose=()=>{e.value=!1,n.value="调试已关闭!",o.value=!0,ue.commit("appendDeBugMsg","调试已关闭!")}}))};return(0,r.bv)((()=>{document.onkeydown=e=>{(e.ctrlKey||e.metaKey)&&"Enter"===e.key&&v(),(e.ctrlKey||e.metaKey)&&"s"===e.key&&(w(),e.preventDefault()),e.shiftKey&&"R"===e.key&&g(),e.shiftKey&&"C"===e.key&&p(),e.ctrlKey&&"e"===e.key&&(u(),e.preventDefault()),e.shiftKey&&"e"===e.key&&(d(),e.preventDefault()),e.shiftKey&&"P"===e.key&&c(),e.ctrlKey&&"p"===e.key&&(s(),e.preventDefault())}})),{debug:v,push:s,pull:c,clearEdit:p,showLoading:e,changeShow:a,warnShow:t,successText:n,changeSuccessShow:l,successShow:o,undo:h,redo:g,conver2Tab:u,conver2Source:d,warnText:i,saveSource:w}}};const je=(0,c.Z)(Te,[["render",te],["__scopeId","data-v-5c287c97"]]);var Ke=je;const Be={class:"out"};function Ae(e,t,n,o,i,a){return(0,r.wg)(),(0,r.iD)("div",Be,[(0,r._)("ul",null,[(0,r._)("li",{class:(0,h.C_)("editTab"===e.current_tab?"active":""),onClick:t[0]||(t[0]=e=>o.handleSetActive("editTab"))}," 编辑源 ",2),(0,r._)("li",{class:(0,h.C_)("editDebug"===e.current_tab?"active":""),onClick:t[1]||(t[1]=e=>o.handleSetActive("editDebug"))}," 调试源 ",2),(0,r._)("li",{class:(0,h.C_)("editList"===e.current_tab?"active":""),onClick:t[2]||(t[2]=e=>o.handleSetActive("editList"))}," 源列表 ",2),(0,r._)("li",{class:(0,h.C_)("editHelp"===e.current_tab?"active":""),onClick:t[3]||(t[3]=e=>o.handleSetActive("editHelp"))}," 帮助信息 ",2)]),((0,r.wg)(),(0,r.j4)(r.Ob,null,[((0,r.wg)(),(0,r.j4)((0,r.LL)(e.current_tab)))],1024))])}function Ee(e,t,n,i,a,l){return(0,r.wy)(((0,r.wg)(),(0,r.iD)("textarea",{placeholder:"这里输出序列化的JSON数据,可直接导入'阅读'APP","onUpdate:modelValue":t[0]||(t[0]=t=>e.source=t),onInput:t[1]||(t[1]=(...e)=>i.updateEditSource&&i.updateEditSource(...e))},null,544)),[[o.nr,e.source]])}var Le={name:"editTab",setup(){const e=(0,D.qj)({source:""}),t=()=>{ue.commit("changeEditTabSource",JSON.parse(e.source))};return(0,r.m0)((()=>{let t=ue.state.editTabSource;Object.keys(t).length>0?(t.lastUpdateTime=(new Date).getTime(),e.source=JSON.stringify(t,null,4)):e.source=""})),{...(0,D.BK)(e),updateEditSource:t}}};const He=(0,c.Z)(Le,[["render",Ee],["__scopeId","data-v-554d8227"]]);var Re=He;function Ne(e,t,n,i,a,l){return(0,r.wg)(),(0,r.iD)(r.HY,null,[i.isBookSource?(0,r.wy)(((0,r.wg)(),(0,r.iD)("input",{key:0,type:"text",style:{"text-align":"center",border:"1px solid #dddddd","border-radius":"4px"},placeholder:"输入搜索关键字,默认搜「我的」","onUpdate:modelValue":t[0]||(t[0]=t=>e.searchKey=t),onInput:t[1]||(t[1]=t=>i.changeSearch(e.searchKey)),onKeydown:t[2]||(t[2]=(0,o.D2)(((...e)=>i.startSearch&&i.startSearch(...e)),["enter"])),title:"输入关键词 enter(回车键)快捷搜索"},null,544)),[[o.nr,e.searchKey]]):(0,r.kq)("",!0),(0,r.wy)((0,r._)("textarea",{placeholder:"这里用于输出调试信息","onUpdate:modelValue":t[3]||(t[3]=t=>e.printDebug=t),ref:"textareaDom",id:"debug_text"},null,512),[[o.nr,e.printDebug]])],64)}var Oe={name:"editDebug",setup(){const e=(0,D.iH)(""),t=(0,D.qj)({printDebug:ue.state.deBugMsg,searchKey:""}),n=e=>{ue.commit("changeSearchKey",e)};(0,r.m0)((()=>{t.printDebug=ue.state.deBugMsg}));const o=()=>{document.querySelectorAll(".menu>button")[6].click()},i=(0,r.Fl)((()=>/bookSource/.test(window.location.href)));return{...(0,D.BK)(t),textareaDom:e,changeSearch:n,startSearch:o,isBookSource:i}}};const Je=(0,c.Z)(Oe,[["render",Ne],["__scopeId","data-v-28b882dd"]]);var qe=Je;const We={style:{display:"flex","flex-flow":"column"}},Ze={class:"tool"},Pe={class:"source_list"},$e=["value"],Me={class:"book_index"},Ye=["onClick"],Ve={class:"book_info"},ze={key:0};function Fe(e,t,n,i,a,l){return(0,r.wg)(),(0,r.iD)("div",We,[(0,r.wy)((0,r._)("input",{class:"search",type:"text",placeholder:"输入筛选关键词(源名称、源URL或源分组)输入自动筛选源","onUpdate:modelValue":t[0]||(t[0]=t=>e.searchKey=t),onFocus:t[1]||(t[1]=t=>e.delArr=[])},null,544),[[o.nr,e.searchKey]]),(0,r._)("div",null,[(0,r._)("div",Ze,[(0,r._)("button",{onClick:t[2]||(t[2]=(...e)=>i.upFile&&i.upFile(...e))},"导入书源文件"),(0,r._)("button",{onClick:t[3]||(t[3]=(...e)=>i.outExport&&i.outExport(...e))},"导出书源文件"),(0,r._)("button",{onClick:t[4]||(t[4]=(...e)=>i.deleteActiveSource&&i.deleteActiveSource(...e))},"删除选中源"),(0,r._)("button",{onClick:t[5]||(t[5]=(...e)=>i.clearAllSources&&i.clearAllSources(...e))},"清空列表")]),(0,r._)("div",Pe,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.filtedSources,((n,a)=>((0,r.wg)(),(0,r.iD)("div",{key:n.bookSourceUrl||n.sourceUrl,class:(0,h.C_)(["book_item",a===i.currentActive?"book_active":""])},[(0,r.wy)((0,r._)("input",{type:"checkbox",value:a,"onUpdate:modelValue":t[6]||(t[6]=t=>e.delArr=t)},null,8,$e),[[o.e8,e.delArr]]),(0,r._)("div",Me,(0,h.zw)(a+1),1),(0,r._)("div",{style:{"margin-left":"10px",flex:"1"},onClick:e=>i.handleItemClick(a)},[(0,r._)("div",Ve,[(0,r._)("span",null,(0,h.zw)(n.bookSourceName||n.sourceName),1),i.isBookSource?((0,r.wg)(),(0,r.iD)("span",ze,"最后修改:"+(0,h.zw)(i.formatTime(n.lastUpdateTime)),1)):(0,r.kq)("",!0),(0,r._)("span",null,"分组:"+(0,h.zw)(n.bookSourceGroup||n.sourceGroup||"无分组"),1)]),(0,r._)("div",null,(0,h.zw)(n.bookSourceUrl||n.sourceUrl),1)],8,Ye)],2)))),128))])])])}var Ge={name:"editList",setup(){let e=(0,D.qj)({searchKey:"",delArr:[],sources:[],filtedSources:[]}),t=(0,D.iH)(null);const n=n=>{t.value=n,ue.commit("clearEdit"),ue.commit("changeCurrentSource",e.filtedSources[n])},o=()=>{ue.commit("clearAllSource")},i=e=>{if(!e)return null;const t=new Date(e),n=t.getFullYear();let o=t.getMonth()+1;o=o<10?"0"+o:o;let r=t.getDate();r=r<10?"0"+r:r;let i=t.getHours();i=i<10?"0"+i:i;let a=t.getMinutes();a=a<10?"0"+a:a;let l=t.getSeconds();return l=l<10?"0"+l:l,n+"-"+o+"-"+r+" "+i+":"+a+":"+l},a=(t,n)=>{if(""===n)return e.sources;let o=/bookSource/.test(location.href);return o?t.filter((e=>e.bookSourceName.toUpperCase().includes(n.toUpperCase())||(e.bookSourceGroup||"").toUpperCase().includes(n.toUpperCase())||e.bookSourceUrl.toUpperCase().includes(n.toUpperCase()))):t.filter((e=>e.sourceName.toUpperCase().includes(n.toUpperCase())||(e.sourceGroup||"").toUpperCase().includes(n.toUpperCase())||e.sourceUrl.toUpperCase().includes(n.toUpperCase())))};(0,r.m0)((()=>{const t=/bookSource/.test(location.href),n=t?ue.state.bookSources:ue.state.rssSources;e.sources=n})),(0,r.m0)((()=>{e.filtedSources=a(e.sources,e.searchKey)}));const l=(0,r.Fl)((()=>/bookSource/.test(window.location.href))),c=()=>{if(0===e.delArr.length)return console.log("没有选中的书源"),!1;const t=[];e.delArr.forEach((n=>{t.push(e.filtedSources[n])})),ce(t).then((t=>{t.isSuccess?(console.log("删除成功"),e.delArr.forEach((t=>{let[n]=e.filtedSources.splice(t,1),o=e.sources.indexOf(n);e.sources.splice(o,1)})),e.delArr=[]):console.log("错误",t)}))},s=()=>{const e=document.createElement("input");e.type="file",e.accept=".json",e.addEventListener("change",(e=>{const t=e.target.files[0];var n=new FileReader;n.readAsText(t),n.onload=()=>{const e=JSON.parse(n.result);ue.commit("saveSources",e)}})),e.click()},u=()=>{const e=document.createElement("a");let t=/bookSource/.test(location.href),n=t?ue.state.bookSources:ue.state.rssSources,o=t?"BookSource":"RssSource";e.download=`${o}_${Date().replace(/.*?\s(\d+)\s(\d+)\s(\d+:\d+:\d+).*/,"$2$1$3").replace(/:/g,"")}.json`;let r=new Blob([JSON.stringify(n,null,4)],{type:"application/json"});e.href=window.URL.createObjectURL(r),e.click()};return{currentActive:t,isBookSource:l,deleteActiveSource:c,handleItemClick:n,...(0,D.BK)(e),formatTime:i,clearAllSources:o,upFile:s,outExport:u}}};const Qe=(0,c.Z)(Ge,[["render",Fe],["__scopeId","data-v-5570960e"]]);var Xe=Qe;const et=(0,r.uE)('书源制作教程xpath基础教程xpath高级教程正则表达式教程正则表达式在线验证工具
^$()[]{}.?+*| 这些是Java正则特殊符号,匹配需转义
(?s) 前缀表示跨行解析
(?m) 前缀表示逐行匹配
(?i) 前缀表示忽略大小写
',6);function tt(e,t,n,o,r,i){return et}var nt={name:"editHelp"};const ot=(0,c.Z)(nt,[["render",tt],["__scopeId","data-v-7ac1e65e"]]);var rt=ot,it={name:"editOut",components:{editDebug:qe,editTab:Re,editList:Xe,editHelp:rt},setup(){const e=(0,D.qj)({url:localStorage.getItem("url")||"",current_tab:ue.state.currentTab||"editTab"}),t=e=>{ue.commit("changeTabName",e)},n=e=>{ue.commit("changeUrl",e)};(0,r.m0)((()=>{e.current_tab=ue.state.currentTab}));const o=()=>{document.querySelectorAll(".menu>button")[1].click()};return{...(0,D.BK)(e),handleSetActive:t,changInput:n,pullSource:o}}};const at=(0,c.Z)(it,[["render",Ae]]);var lt=at,ct={components:{editMenu:Ke,editOut:lt},setup(){const e=(0,D.qj)({});return(0,r.bv)((()=>{})),{...(0,D.BK)(e)}}};const st=(0,c.Z)(ct,[["render",y],["__scopeId","data-v-0fc56f5e"]]);var ut=st;const dt={class:"main"};function ht(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",dt,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}const pt=e=>((0,r.dD)("data-v-2ede5ef6"),e=e(),(0,r.Cn)(),e),gt={class:"edit_input"},wt=pt((()=>(0,r._)("i",null,":",-1))),vt=["id","placeholder","rows","value"];function mt(e,t,n,o,i,a){return(0,r.wg)(),(0,r.iD)("div",gt,[(0,r._)("span",null,[(0,r.Uk)((0,h.zw)(n.title),1),wt]),(0,r._)("textarea",{id:n.type,placeholder:n.hint,rows:n.rows,value:n.content,ref:"attr",onInput:t[0]||(t[0]=(...e)=>o.change&&o.change(...e)),onBlur:t[1]||(t[1]=(...e)=>o.changeHistory&&o.changeHistory(...e)),onFocus:t[2]||(t[2]=(...e)=>o.changeHeight&&o.changeHeight(...e))},null,40,vt)])}var St={props:{title:{type:String,default:""},rows:{type:Number,default:1},hint:{type:String,default:""},type:{type:String,default:""},content:{type:[String,Number,Boolean],default:""}},emits:["changeContent"],setup(e,{emit:t}){const n=(0,D.iH)(""),o=()=>{t("changeContent",{value:n.value.value,type:n.value.getAttribute("id")})},i=()=>{localStorage.getItem("history")||localStorage.setItem("history",JSON.stringify({new:[],old:[]}));const e=JSON.parse(localStorage.getItem("history")),t=e.new;if(t.length){const e=n.value.getAttribute("id");if(e.includes("_")||t[t.length-1][e]===ue.state.currentSource[e]){if(e.includes("_")){let n=e.split("_")[0],o=e.split("_")[1];t[t.length-1][n][o]!==ue.state.currentSource[n][o]&&ue.commit("editHistory",ue.state.currentSource)}}else ue.commit("editHistory",ue.state.currentSource)}else ue.commit("editHistory",ue.state.currentSource)},a=()=>{(0,r.Y3)((()=>{let e=n.value;const t=e.scrollHeight,o=e.offsetHeight;o<=t&&(e.style.height="auto",e.style.height=e.scrollHeight+"px")}))};return{changeHistory:i,change:o,attr:n,changeHeight:a}}};const ft=(0,c.Z)(St,[["render",mt],["__scopeId","data-v-2ede5ef6"]]);var bt=ft,Ct={base:[{title:"源域名",rows:1,id:"bookSourceUrl",hint:"<必填>通常填写网站主页,例: https://www.qidian.com"},{title:"源类型",rows:1,id:"bookSourceType",hint:"<必填>0:文本 1:音频 2:图片 3:文件(只提供下载的网站)"},{title:"源名称",rows:1,id:"bookSourceName",hint:"<必填>会显示在源列表"},{title:"源分组",rows:1,id:"bookSourceGroup",hint:"<选填>描述源的特征信息"},{title:"源注释",rows:1,id:"bookSourceComment",hint:"<选填>描述源作者和状态"},{title:"书源变量说明",rows:1,id:"variableComment",hint:"<选填>书源变量说明"},{title:"登录地址",rows:1,id:"loginUrl",hint:"<选填>填写网站登录网址,仅在需要登录的源有用"},{title:"登录界面",rows:3,id:"loginUi",hint:"<选填>自定义登录界面"},{title:"登录检测",rows:3,id:"loginCheckJs",hint:"<选填>登录检测js"},{title:"封面解密",rows:3,id:"coverDecodeJs",hint:"<选填>封面解密js"},{title:"并发率",rows:1,id:"concurrentRate",hint:"<选填>并发率"},{title:"请求头",rows:3,id:"header",hint:"<选填>客户端标识"},{title:"链接验证",rows:1,id:"bookUrlPattern",hint:"<选填>当详情页URL与源URL的域名不一致时有效,用于添加网址"}],search:[{title:"搜索地址",rows:1,id:"searchUrl",hint:"[域名可省略]/search.php@kw={{key}}"},{title:"校验文字",rows:1,id:"ruleSearch_checkKeyWord",hint:"校验关键字"},{title:"列表规则",rows:1,id:"ruleSearch_bookList",hint:"选择书籍节点 (规则结果为List)"},{title:"书名规则",rows:1,id:"ruleSearch_name",hint:"选择节点书名 (规则结果为String)"},{title:"作者规则",rows:1,id:"ruleSearch_author",hint:"选择节点作者 (规则结果为String)"},{title:"分类规则",rows:1,id:"ruleSearch_kind",hint:"选择节点分类信息 (规则结果为String)"},{title:"字数规则",rows:1,id:"ruleSearch_wordCount",hint:"选择节点字数信息 (规则结果为String)"},{title:"最新章节",rows:1,id:"ruleSearch_lastChapter",hint:"选择节点最新章节 (规则结果为String)"},{title:"简介规则",rows:1,id:"ruleSearch_intro",hint:"选择节点书籍简介 (规则结果为String)"},{title:"封面规则",rows:1,id:"ruleSearch_coverUrl",hint:"选择节点书籍封面 (规则结果为String类型的url)"},{title:"详情地址",rows:1,id:"ruleSearch_bookUrl",hint:"选择书籍详情页网址 (规则结果为String类型的url)"}],find:[{title:"发现地址",rows:6,id:"exploreUrl",hint:"内容能显示在发现菜单\n每行一条发现分类(网址域名可省略),例:\n名称1::网址(Url)1\n名称2::网址(Url)2\n..."},{title:"列表规则",rows:1,id:"ruleExplore_bookList",hint:"选择书籍节点 (规则结果为List)"},{title:"书名规则",rows:1,id:"ruleExplore_name",hint:"选择节点书名 (规则结果为String)"},{title:"作者规则",rows:1,id:"ruleExplore_author",hint:"选择节点作者 (规则结果为String)"},{title:"分类规则",rows:1,id:"ruleExplore_kind",hint:"选择节点分类信息 (规则结果为String)"},{title:"字数规则",rows:1,id:"ruleExplore_wordCount",hint:"选择节点字数信息 (规则结果为String)"},{title:"最新章节",rows:1,id:"ruleExplore_lastChapter",hint:"选择节点最新章节 (规则结果为String)"},{title:"简介规则",rows:1,id:"ruleExplore_intro",hint:"选择节点书籍简介 (规则结果为String)"},{title:"封面规则",rows:1,id:"ruleExplore_coverUrl",hint:"选择节点书籍封面 (规则结果为String类型的url)"},{title:"详情地址",rows:1,id:"ruleExplore_bookUrl",hint:"选择书籍详情页网址 (规则结果为String类型的url)"}],detail:[{title:"预处理",rows:3,id:"ruleBookInfo_init",hint:"用于加速详情信息检索,只支持AllInOne规则"},{title:"书名规则",rows:1,id:"ruleBookInfo_name",hint:"选择节点书名 (规则结果为String)"},{title:"作者规则",rows:1,id:"ruleBookInfo_author",hint:"选择节点作者 (规则结果为String)"},{title:"分类规则",rows:1,id:"ruleBookInfo_kind",hint:"选择节点分类信息 (规则结果为String)"},{title:"字数规则",rows:1,id:"ruleBookInfo_wordCount",hint:"选择节点字数信息 (规则结果为String)"},{title:"最新章节",rows:1,id:"ruleBookInfo_lastChapter",hint:"选择节点最新章节 (规则结果为String)"},{title:"简介规则",rows:1,id:"ruleBookInfo_intro",hint:"选择节点书籍简介 (规则结果为String)"},{title:"封面规则",rows:1,id:"ruleBookInfo_coverUrl",hint:"选择节点书籍封面 (规则结果为String类型的url)"},{title:"目录地址",rows:1,id:"ruleBookInfo_tocUrl",hint:"选择书籍详情页网址 (规则结果为String类型的url, 与详情页相同时可省略)"},{title:"下载URL",rows:1,id:"ruleBookInfo_downloadUrls",hint:"文件类书源下载地址 (规则结果为String类型的url, 多个链接返回数组)"},{title:"允许修改书名作者",rows:1,id:"ruleBookInfo_canReName",hint:"允许修改书名作者(规则结果为String类型, 默认不允许)"}],directory:[{title:"更新前JS",rows:3,id:"ruleToc_preUpdateJs",hint:"动态更新书籍目录链接"},{title:"列表规则",rows:3,id:"ruleToc_chapterList",hint:"选择目录列表的章节节点 (规则结果为List)"},{title:"章节名称",rows:1,id:"ruleToc_chapterName",hint:"选择章节名称 (规则结果为String)"},{title:"章节地址",rows:1,id:"ruleToc_chapterUrl",hint:"选择章节链接 (规则结果为String类型的Url)"},{title:"卷名标识",rows:1,id:"ruleToc_isVolume",hint:"章节名称是否是卷名 (规则结果为Bool)"},{title:"收费标识",rows:1,id:"ruleToc_isVip",hint:"章节是否为VIP章节 (规则结果为Bool)"},{title:"购买标识",rows:1,id:"ruleToc_isPay",hint:"章节是否为已购买 (规则结果为Bool)"},{title:"章节信息",rows:1,id:"ruleToc_updateTime",hint:"选择章节信息 (规则结果为String)"},{title:"翻页规则",rows:1,id:"ruleToc_nextTocUrl",hint:"选择目录下一页链接 (规则结果为List或String)"}],content:[{title:"脚本注入",rows:3,id:"ruleContent_webJs",hint:"注入javascript,用于模拟鼠标点击等,必须有返回值,一般为String类型"},{title:"正文规则",rows:1,id:"ruleContent_content",hint:"选择正文内容 (规则结果为String)"},{title:"翻页规则",rows:1,id:"ruleContent_nextContentUrl",hint:"选择下一分页(不是下一章)链接 (规则结果为String类型的Url)"},{title:"资源正则",rows:1,id:"ruleContent_sourceRegex",hint:"匹配资源的url特征,用于嗅探"},{title:"替换规则",rows:1,id:"ruleContent_replaceRegex",hint:"多页内容合并后替换,用于正文净化"},{title:"图片样式",rows:1,id:"ruleContent_imageStyle",hint:"FULL:铺满 不填:默认样式"},{title:"购买操作",rows:1,id:"ruleContent_payAction",hint:"填写JavaScript 返回购买链接或者调用购买接口"},{title:"图片解密",rows:1,id:"ruleContent_imageDecode",hint:"填写JavaScript 返回解密图片的bytes "}],review:[{title:"段评URL",rows:1,id:"ruleReview_reviewUrl",hint:"段评URL"},{title:"段评发布者头像",rows:1,id:"ruleReview_avatarRule",hint:"段评发布者头像"},{title:"段评内容",rows:1,id:"ruleReview_contentRule",hint:"段评内容"},{title:"段评发布时间",rows:1,id:"ruleReview_postTimeRule",hint:"段评发布时间"},{title:"获取段评回复URL",rows:1,id:"ruleReview_reviewQuoteUrl",hint:"获取段评回复URL"},{title:"点赞URL",rows:1,id:"ruleReview_voteUpUrl",hint:"点赞URL"},{title:"点踩URL",rows:1,id:"ruleReview_voteDownUrl",hint:"点踩URL"},{title:"发送回复URL",rows:1,id:"ruleReview_postReviewUrl",hint:"发送回复URL"},{title:"发送回复段评URL",rows:1,id:"ruleReview_postQuoteUrl",hint:"发送回复段评URL"},{title:"删除段评URL",rows:1,id:"ruleReview_deleteUrl",hint:"删除段评URL"}],other:[{title:"启用搜索",rows:1,id:"enabled",hint:"启用: true 关闭: false (可选,默认true)"},{title:"启用发现",rows:1,id:"enabledExplore",hint:"启用: true 关闭: false (可选,默认true)"},{title:"启用段评",rows:1,id:"enabledReview",hint:"启用: true 关闭: false (可选,默认false)"},{title:"启用CookieJar",rows:1,id:"enabledCookieJar",hint:"启用: true 关闭: false (可选,默认false)"},{title:"搜索权重",rows:1,id:"weight",hint:"整数: 0~N (可选,默认0) | 数字越大越靠前"},{title:"排序编号",rows:1,id:"customOrder",hint:"整数: 0~N (可选,默认0) | 数字越小越靠前"}]};function _t(){const e=(0,D.qj)({currentSource:ue.state.currentSource}),t=e=>{ue.commit("changeCurrentSourceValue",e)},n=t=>{try{if(t.includes("_")){let n=t.split("_")[0],o=t.split("_")[1],r=e.currentSource[n];return r?r[o]:null}return e.currentSource[t]}catch(n){console.log("导入错误",n.TypeError),ue.commit("clearEdit")}};return(0,r.m0)((()=>{e.currentSource=ue.state.currentSource})),{...(0,D.BK)(e),upData:t,getContent:n}}var kt={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.base});return{...(0,D.BK)(n),upData:e,getContent:t}}};const yt=(0,c.Z)(kt,[["render",ht]]);var Dt=yt;const Ut={class:"main"};function It(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Ut,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var xt={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.search});return{...(0,D.BK)(n),upData:e,getContent:t}}};const Tt=(0,c.Z)(xt,[["render",It]]);var jt=Tt;const Kt={class:"main"};function Bt(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Kt,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var At={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.directory});return{...(0,D.BK)(n),upData:e,getContent:t}}};const Et=(0,c.Z)(At,[["render",Bt]]);var Lt=Et;const Ht={class:"main"};function Rt(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Ht,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Nt={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.content});return{...(0,D.BK)(n),upData:e,getContent:t}}};const Ot=(0,c.Z)(Nt,[["render",Rt]]);var Jt=Ot;const qt={class:"main"};function Wt(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",qt,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Zt={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.detail});return{...(0,D.BK)(n),upData:e,getContent:t}}};const Pt=(0,c.Z)(Zt,[["render",Wt]]);var $t=Pt;const Mt={class:"main"};function Yt(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Mt,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Vt={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.other});return{...(0,D.BK)(n),upData:e,getContent:t}}};const zt=(0,c.Z)(Vt,[["render",Yt]]);var Ft=zt;const Gt={class:"main"};function Qt(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Gt,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Xt={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.find});return{...(0,D.BK)(n),upData:e,getContent:t}}};const en=(0,c.Z)(Xt,[["render",Qt]]);var tn=en;const nn={class:"main"};function on(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",nn,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var rn={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Ct.review});return{...(0,D.BK)(n),upData:e,getContent:t}}};const an=(0,c.Z)(rn,[["render",on]]);var ln=an;const cn=e=>((0,r.dD)("data-v-63af33ef"),e=e(),(0,r.Cn)(),e),sn={class:"left"},un=cn((()=>(0,r._)("div",null,[(0,r._)("a",{href:"/"},"←主页"),(0,r._)("b",null,"订阅源")],-1))),dn=["onClick"],hn=["onClick"],pn=["onClick"],gn=["onClick"];function wn(e,t,n,o,i,a){const l=(0,r.up)("router-link"),c=(0,r.up)("router-view"),s=(0,r.up)("edit-menu"),u=(0,r.up)("edit-out");return(0,r.wg)(),(0,r.iD)(r.HY,null,[(0,r._)("div",sn,[(0,r._)("div",null,[un,(0,r._)("ul",null,[(0,r.Wm)(l,{to:{name:"rss-base"},custom:""},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 基础 ",10,dn)])),_:1}),(0,r.Wm)(l,{to:{name:"rss-list"},custom:""},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 列表 ",10,hn)])),_:1}),(0,r.Wm)(l,{to:{name:"rss-webView"},custom:""},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," WebView ",10,pn)])),_:1}),(0,r.Wm)(l,{custom:"",to:{name:"rss-other"}},{default:(0,r.w5)((({navigate:e,isActive:t})=>[(0,r._)("li",{onClick:e,class:(0,h.C_)({active:t?"active":""})}," 其他 ",10,gn)])),_:1})])]),(0,r.Wm)(c,null,{default:(0,r.w5)((({Component:e})=>[((0,r.wg)(),(0,r.j4)(r.Ob,null,[((0,r.wg)(),(0,r.j4)((0,r.LL)(e)))],1024))])),_:1})]),(0,r.Wm)(s),(0,r.Wm)(u)],64)}var vn={components:{editMenu:Ke,editOut:lt},setup(){const e=(0,D.qj)({});return(0,r.bv)((()=>{})),{...(0,D.BK)(e)}}};const mn=(0,c.Z)(vn,[["render",wn],["__scopeId","data-v-63af33ef"]]);var Sn=mn;const fn={class:"main"};function bn(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",fn,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Cn={base:[{title:"源域名",rows:1,id:"sourceUrl",hint:"<必填>通常填写网站主页,例: https://www.qidian.com"},{title:"图标",rows:1,id:"sourceIcon",hint:"<选填>填写图片网络链接"},{title:"源名称",rows:1,id:"sourceName",hint:"<必填>会显示在源列表"},{title:"源分组",rows:1,id:"sourceGroup",hint:"<选填>描述源的特征信息"},{title:"源注释",rows:1,id:"sourceComment",hint:"<选填>描述源作者和状态"},{title:"源变量说明",rows:1,id:"variableComment",hint:"<选填>源变量说明"},{title:"登录地址",rows:1,id:"loginUrl",hint:"<选填>填写网站登录网址,仅在需要登录的源有用"},{title:"登录界面",rows:3,id:"loginUi",hint:"<选填>自定义登录界面"},{title:"登录检测",rows:3,id:"loginCheckJs",hint:"<选填>登录检测js"},{title:"封面解密",rows:3,id:"coverDecodeJs",hint:"<选填>封面解密js"},{title:"并发率",rows:1,id:"concurrentRate",hint:"<选填>并发率"},{title:"请求头",rows:3,id:"header",hint:"<选填>客户端标识"},{title:"分类地址",rows:3,id:"sortUrl",hint:"<选填>名称1::链接1\n名称2::链接2"}],list:[{title:"列表样式",rows:1,id:"articleStyle",hint:"<选填>0,1,2 (默认0)"},{title:"列表规则",rows:1,id:"ruleArticles",hint:"规则结果为List"},{title:"翻页规则",rows:1,id:"ruleNextPage",hint:"下一页链接 规则结果为List或String"},{title:"标题规则",rows:1,id:"ruleTitle",hint:"文章标题 规则结果为String"},{title:"时间规则",rows:1,id:"rulePubDate",hint:"文章发布时间 规则结果为String"},{title:"描述规则",rows:1,id:"ruleDescription",hint:"文章简要描述 规则结果为String"},{title:"图片规则",rows:1,id:"ruleImage",hint:"文章图片链接 规则结果为String"},{title:"链接规则",rows:1,id:"ruleLink",hint:"文章链接 规则结果为String"}],webView:[{title:"启用JS",rows:1,id:"enableJs",hint:"启用: true 关闭: false (可选,默认true)"},{title:"加载地址",rows:1,id:"loadWithBaseUrl",hint:"启用: true 关闭: false (可选,默认true)"},{title:"内容规则",rows:1,id:"ruleContent",hint:"文章正文"},{title:"样式规则",rows:3,id:"style",hint:"文章正文样式 填写css"}],other:[{title:"启用",rows:1,id:"enabled",hint:"启用: true 关闭: false (可选,默认true)"},{title:"启用CookieJar",rows:1,id:"enabledCookieJar",hint:"启用: true 关闭: false (可选,默认false)"},{title:"单URL",rows:1,id:"singleUrl",hint:"启用: true 关闭: false (可选,默认false)"},{title:"排序编号",rows:1,id:"customOrder",hint:"整数: 0~N (可选,默认0) | 数字越小越靠前"}]},_n={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Cn.base});return{...(0,D.BK)(n),upData:e,getContent:t}}};const kn=(0,c.Z)(_n,[["render",bn]]);var yn=kn;const Dn={class:"main"};function Un(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Dn,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var In={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Cn.list});return{...(0,D.BK)(n),upData:e,getContent:t}}};const xn=(0,c.Z)(In,[["render",Un]]);var Tn=xn;const jn={class:"main"};function Kn(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",jn,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Bn={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Cn.webView});return{...(0,D.BK)(n),upData:e,getContent:t}}};const An=(0,c.Z)(Bn,[["render",Kn]]);var En=An;const Ln={class:"main"};function Hn(e,t,n,o,i,a){const l=(0,r.up)("edit-input");return(0,r.wg)(),(0,r.iD)("div",Ln,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.data,((e,t)=>((0,r.wg)(),(0,r.j4)(l,{key:t,type:e.id,hint:e.hint,title:e.title,rows:e.rows,content:o.getContent(e.id),onChangeContent:o.upData},null,8,["type","hint","title","rows","content","onChangeContent"])))),128))])}var Rn={components:{editInput:bt},setup(){const{upData:e,getContent:t}=_t(),n=(0,D.qj)({data:Cn.other});return{...(0,D.BK)(n),upData:e,getContent:t}}};const Nn=(0,c.Z)(Rn,[["render",Hn]]);var On=Nn;const Jn=[{path:"/bookSource",name:"book-home",component:ut,redirect:{name:"book-base"},children:[{path:"/bookSource/base",name:"book-base",component:Dt},{path:"/bookSource/search",name:"book-search",component:jt},{path:"/bookSource/find",name:"book-find",component:tn},{path:"/bookSource/detail",name:"book-detail",component:$t},{path:"/bookSource/directory",name:"book-directory",component:Lt},{path:"/bookSource/content",name:"book-content",component:Jt},{path:"/bookSource/review",name:"book-review",component:ln},{path:"/bookSource/other",name:"book-other",component:Ft}]},{path:"/rssSource",name:"rss-home",component:Sn,redirect:{name:"rss-base"},children:[{path:"/rssSource/base",name:"rss-base",component:yn},{path:"/rssSource/list",name:"rss-list",component:Tn},{path:"/rssSource/webView",name:"rss-webView",component:En},{path:"/rssSource/other",name:"rss-other",component:On}]}],qn=(0,d.p7)({history:(0,d.r5)(),routes:Jn});var Wn=qn;(0,o.ri)(u).use(ue).use(Wn).mount("#app")}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.m=e,function(){var e=[];n.O=function(t,o,r,i){if(!o){var a=1/0;for(u=0;u=i)&&Object.keys(n.O).every((function(e){return n.O[e](o[c])}))?o.splice(c--,1):(l=!1,i0&&e[u-1][2]>i;u--)e[u]=e[u-1];e[u]=[o,r,i]}}(),function(){n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={143:0};n.O.j=function(t){return 0===e[t]};var t=function(t,o){var r,i,a=o[0],l=o[1],c=o[2],s=0;if(a.some((function(t){return 0!==e[t]}))){for(r in l)n.o(l,r)&&(n.m[r]=l[r]);if(c)var u=c(n)}for(t&&t(o);s