diff --git a/app/src/main/assets/web/source/assets/index-b1381eda.js b/app/src/main/assets/web/source/assets/index-839cf0f5.js similarity index 99% rename from app/src/main/assets/web/source/assets/index-b1381eda.js rename to app/src/main/assets/web/source/assets/index-839cf0f5.js index b1aafdc40..c0701c37e 100644 --- a/app/src/main/assets/web/source/assets/index-b1381eda.js +++ b/app/src/main/assets/web/source/assets/index-839cf0f5.js @@ -24,7 +24,7 @@ var Iv=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var $k=Iv((Kt,qt) */let qm;const ma=e=>qm=e,Wm=Symbol();function kl(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var as;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(as||(as={}));function cA(){const e=ep(!0),t=e.run(()=>V({}));let n=[],r=[];const o=po({install(s){ma(o),o._a=s,s.provide(Wm,o),s.config.globalProperties.$pinia=o,r.forEach(i=>n.push(i)),r=[]},use(s){return!this._a&&!uA?r.push(s):n.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return o}const Gm=()=>{};function gd(e,t,n,r=Gm){e.push(t);const o=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!n&&Kl()&&ql(o),o}function ro(e,...t){e.slice().forEach(n=>{n(...t)})}function Il(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,r)=>e.set(r,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const r=t[n],o=e[n];kl(o)&&kl(r)&&e.hasOwnProperty(n)&&!Be(r)&&!jn(r)?e[n]=Il(o,r):e[n]=r}return e}const fA=Symbol();function dA(e){return!kl(e)||!e.hasOwnProperty(fA)}const{assign:cr}=Object;function pA(e){return!!(Be(e)&&e.effect)}function hA(e,t,n,r){const{state:o,actions:s,getters:i}=t,a=n.state.value[e];let l;function u(){a||(n.state.value[e]=o?o():{});const c=Gr(n.state.value[e]);return cr(c,s,Object.keys(i||{}).reduce((f,p)=>(f[p]=po(T(()=>{ma(n);const m=n._s.get(e);return i[p].call(m,m)})),f),{}))}return l=Jm(e,u,t,n,r,!0),l}function Jm(e,t,n={},r,o,s){let i;const a=cr({actions:{}},n),l={deep:!0};let u,c,f=po([]),p=po([]),m;const v=r.state.value[e];!s&&!v&&(r.state.value[e]={}),V({});let d;function y(C){let A;u=c=!1,typeof C=="function"?(C(r.state.value[e]),A={type:as.patchFunction,storeId:e,events:m}):(Il(r.state.value[e],C),A={type:as.patchObject,payload:C,storeId:e,events:m});const P=d=Symbol();Ne().then(()=>{d===P&&(u=!0)}),c=!0,ro(f,A,r.state.value[e])}const g=s?function(){const{state:A}=n,P=A?A():{};this.$patch(I=>{cr(I,P)})}:Gm;function _(){i.stop(),f=[],p=[],r._s.delete(e)}function S(C,A){return function(){ma(r);const P=Array.from(arguments),I=[],H=[];function L(te){I.push(te)}function k(te){H.push(te)}ro(p,{args:P,name:C,store:w,after:L,onError:k});let j;try{j=A.apply(this&&this.$id===e?this:w,P)}catch(te){throw ro(H,te),te}return j instanceof Promise?j.then(te=>(ro(I,te),te)).catch(te=>(ro(H,te),Promise.reject(te))):(ro(I,j),j)}}const E={_p:r,$id:e,$onAction:gd.bind(null,p),$patch:y,$reset:g,$subscribe(C,A={}){const P=gd(f,C,A.detached,()=>I()),I=i.run(()=>de(()=>r.state.value[e],H=>{(A.flush==="sync"?c:u)&&C({storeId:e,type:as.direct,events:m},H)},cr({},l,A)));return P},$dispose:_},w=At(E);r._s.set(e,w);const x=r._e.run(()=>(i=ep(),i.run(()=>t())));for(const C in x){const A=x[C];if(Be(A)&&!pA(A)||jn(A))s||(v&&dA(A)&&(Be(A)?A.value=v[C]:Il(A,v[C])),r.state.value[e][C]=A);else if(typeof A=="function"){const P=S(C,A);x[C]=P,a.actions[C]=A}}return cr(w,x),cr(xe(w),x),Object.defineProperty(w,"$state",{get:()=>r.state.value[e],set:C=>{y(A=>{cr(A,C)})}}),r._p.forEach(C=>{cr(w,i.run(()=>C({store:w,app:r._a,pinia:r,options:a})))}),v&&s&&n.hydrate&&n.hydrate(w.$state,v),u=!0,c=!0,w}function mA(e,t,n){let r,o;const s=typeof t=="function";typeof e=="string"?(r=e,o=s?n:t):(o=e,r=e.id);function i(a,l){const u=at();return a=a||u&&Ee(Wm,null),a&&ma(a),a=qm,a._s.has(r)||(s?Jm(r,t,o,a):hA(r,o,a)),a._s.get(r)}return i.$id=r,i}function Vu(e){{e=xe(e);const t={};for(const n in e){const r=e[n];(Be(r)||jn(r))&&(t[n]=Vt(e,n))}return t}}const vA=cA(),Pr=/bookSource/.test(location.href),jo=mA("source",{state:()=>({bookSources:[],rssSources:[],errorPushSources:[],currentSource:vd,currentTab:localStorage.getItem("tabName")||"editTab",editTabSource:{},isDebuging:!1}),getters:{sources:e=>Pr?e.bookSources:e.rssSources,currentSourceUrl:e=>Pr?e.currentSource.bookSourceUrl:e.currentSource.sourceUrl,searchKey:e=>Pr?e.currentSource.ruleSearch.checkKeyWord||"我的":null},actions:{startDebug(){this.currentTab="editDebug",this.isDebuging=!0},debugFinish(){this.isDebuging=!1},saveSources(e){Pr?this.bookSources=e:this.rssSources=e},deleteSources(e){let t=Pr?this.bookSources:this.rssSources;e.forEach(n=>{let r=t.indexOf(n);r>-1&&t.splice(r,1)})},saveCurrentSource(){let e=this.currentSource,t,n;Pr?(t=this.bookSources,n="bookSourceUrl"):(t=this.rssSources,n="sourceUrl");let r=t.findIndex(o=>o[n]===e[n]);e=JSON.parse(JSON.stringify(e)),r>-1?t.splice(r,1,e):t.push(e)},changeCurrentSource(e){const t=JSON.stringify(e);this.currentSource=JSON.parse(t)},async setPushReturnSources(e){Pr?this.errorPushSources=this.sources.filter(t=>e.every(n=>n.bookSourceUrl!==t.bookSourceUrl)):this.errorPushSources=this.sources.filter(t=>e.every(n=>n.sourceUrl!==t.sourceUrl))},changeTabName(e){this.currentTab=e,localStorage.setItem("tabName",e)},changeEditTabSource(e){const t=JSON.stringify(e);this.editTabSource=JSON.parse(t)},editHistory(e){let t;if(localStorage.getItem("history"))t=JSON.parse(localStorage.getItem("history")),t.new.push(e),t.new.length>50&&t.new.shift(),t.old.length>50&&t.old.shift(),localStorage.setItem("history",JSON.stringify(t));else{const n={new:[e],old:[]};localStorage.setItem("history",JSON.stringify(n))}},editHistoryUndo(){if(localStorage.getItem("history")){let e=JSON.parse(localStorage.getItem("history"));e.old.push(this.currentSource),e.new.length&&(this.currentSource=e.new.pop()),localStorage.setItem("history",JSON.stringify(e))}},clearAllHistory(){localStorage.setItem("history",JSON.stringify({new:[],old:[]}))},clearEdit(){this.editTabSource={},this.currentSource=vd},clearAllSource(){this.bookSources=[],this.rssSources=[]}}}),gA={class:"tool"},yA={__name:"editList",setup(e){const t=jo(),n=V([]),r=V(""),{sources:o,errorPushSources:s}=Vu(t),i=T(()=>/bookSource/.test(window.location.href)),a=m=>{t.changeCurrentSource(m)},l=()=>{t.deleteSources(n.value),n.value=[]},u=()=>{t.clearAllSource(),n.value=[]},c=T(()=>{let m=r.value;return m===""?o.value:o.value.filter(v=>lA(v,m))}),f=()=>{const m=document.createElement("input");m.type="file",m.accept=".json,.txt",m.addEventListener("change",v=>{const d=v.target.files[0];var y=new FileReader;y.readAsText(d),y.onload=()=>{try{const g=JSON.parse(y.result);t.saveSources(g)}catch{bt({message:"上传的源格式错误",type:"error"})}}}),m.click()},p=()=>{const m=document.createElement("a");let v=t.sources,d=i.value?"BookSource":"RssSource";m.download=`${d}_${Date().replace(/.*?\s(\d+)\s(\d+)\s(\d+:\d+:\d+).*/,"$2$1$3").replace(/:/g,"")}.json`;let y=new Blob([JSON.stringify(v,null,4)],{type:"application/json"});m.href=window.URL.createObjectURL(y),m.click()};return(m,v)=>{const d=Bo,y=Tm,g=Yx,_=Xx;return $(),W(Re,null,[Q(d,{modelValue:h(r),"onUpdate:modelValue":v[0]||(v[0]=S=>Be(r)?r.value=S:null),class:"search","prefix-icon":h(Nh),placeholder:"筛选源"},null,8,["modelValue","prefix-icon"]),Z("div",gA,[Q(y,{onClick:f,icon:h(FE)},{default:ee(()=>[Ye(" 打开 ")]),_:1},8,["icon"]),Q(y,{disabled:h(n).length===0,onClick:p,icon:h(CE)},{default:ee(()=>[Ye(" 导出")]),_:1},8,["disabled","icon"]),Q(y,{icon:h(Af),onClick:l,disabled:h(n).length===0},{default:ee(()=>[Ye("删除")]),_:1},8,["icon","disabled"]),Q(y,{type:"danger",icon:h(Af),onClick:u,disabled:h(o).length===0},{default:ee(()=>[Ye("清空")]),_:1},8,["icon","disabled"])]),Q(_,{id:"source-list",modelValue:h(n),"onUpdate:modelValue":v[1]||(v[1]=S=>Be(n)?n.value=S:null)},{default:ee(()=>[($(!0),W(Re,null,cn(h(c),S=>($(),se(g,{size:"large",border:"",label:S,class:q({error:h(s).includes(S)}),onClick:E=>a(S),key:S.bookSourceName},{default:ee(()=>[Ye(We(S.bookSourceName||S.sourceName),1)]),_:2},1032,["label","class","onClick"]))),128))]),_:1},8,["modelValue"])],64)}}},bA=ko(yA,[["__scopeId","data-v-47b70e8f"]]);function Ym(e,t){return function(){return e.apply(t,arguments)}}const{toString:Xm}=Object.prototype,{getPrototypeOf:Uu}=Object,Ku=(e=>t=>{const n=Xm.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),tr=e=>(e=e.toLowerCase(),t=>Ku(t)===e),va=e=>t=>typeof t===e,{isArray:zo}=Array,As=va("undefined");function _A(e){return e!==null&&!As(e)&&e.constructor!==null&&!As(e.constructor)&&_r(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Qm=tr("ArrayBuffer");function wA(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Qm(e.buffer),t}const SA=va("string"),_r=va("function"),Zm=va("number"),qu=e=>e!==null&&typeof e=="object",EA=e=>e===!0||e===!1,mi=e=>{if(Ku(e)!=="object")return!1;const t=Uu(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},CA=tr("Date"),OA=tr("File"),TA=tr("Blob"),xA=tr("FileList"),$A=e=>qu(e)&&_r(e.pipe),AA=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Xm.call(e)===t||_r(e.toString)&&e.toString()===t)},PA=tr("URLSearchParams"),kA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ds(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),zo(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const tv=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),nv=e=>!As(e)&&e!==tv;function Rl(){const{caseless:e}=nv(this)&&this||{},t={},n=(r,o)=>{const s=e&&ev(t,o)||o;mi(t[s])&&mi(r)?t[s]=Rl(t[s],r):mi(r)?t[s]=Rl({},r):zo(r)?t[s]=r.slice():t[s]=r};for(let r=0,o=arguments.length;r(Ds(t,(o,s)=>{n&&_r(o)?e[s]=Ym(o,n):e[s]=o},{allOwnKeys:r}),e),RA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),NA=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},LA=(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&Uu(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},MA=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},FA=e=>{if(!e)return null;if(zo(e))return e;let t=e.length;if(!Zm(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},BA=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Uu(Uint8Array)),DA=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},jA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},zA=tr("HTMLFormElement"),HA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),yd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),VA=tr("RegExp"),rv=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ds(n,(o,s)=>{t(o,s,e)!==!1&&(r[s]=o)}),Object.defineProperties(e,r)},UA=e=>{rv(e,(t,n)=>{if(_r(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(_r(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},KA=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return zo(e)?r(e):r(String(e).split(t)),n},qA=()=>{},WA=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Va="abcdefghijklmnopqrstuvwxyz",bd="0123456789",ov={DIGIT:bd,ALPHA:Va,ALPHA_DIGIT:Va+Va.toUpperCase()+bd},GA=(e=16,t=ov.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function JA(e){return!!(e&&_r(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const YA=e=>{const t=new Array(10),n=(r,o)=>{if(qu(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const s=zo(r)?[]:{};return Ds(r,(i,a)=>{const l=n(i,o+1);!As(l)&&(s[a]=l)}),t[o]=void 0,s}}return r};return n(e,0)},U={isArray:zo,isArrayBuffer:Qm,isBuffer:_A,isFormData:AA,isArrayBufferView:wA,isString:SA,isNumber:Zm,isBoolean:EA,isObject:qu,isPlainObject:mi,isUndefined:As,isDate:CA,isFile:OA,isBlob:TA,isRegExp:VA,isFunction:_r,isStream:$A,isURLSearchParams:PA,isTypedArray:BA,isFileList:xA,forEach:Ds,merge:Rl,extend:IA,trim:kA,stripBOM:RA,inherits:NA,toFlatObject:LA,kindOf:Ku,kindOfTest:tr,endsWith:MA,toArray:FA,forEachEntry:DA,matchAll:jA,isHTMLForm:zA,hasOwnProperty:yd,hasOwnProp:yd,reduceDescriptors:rv,freezeMethods:UA,toObjectSet:KA,toCamelCase:HA,noop:qA,toFiniteNumber:WA,findKey:ev,global:tv,isContextDefined:nv,ALPHABET:ov,generateString:GA,isSpecCompliantForm:JA,toJSONObject:YA};function He(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}U.inherits(He,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const sv=He.prototype,iv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{iv[e]={value:e}});Object.defineProperties(He,iv);Object.defineProperty(sv,"isAxiosError",{value:!0});He.from=(e,t,n,r,o,s)=>{const i=Object.create(sv);return U.toFlatObject(e,i,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),He.call(i,e.message,t,n,r,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const XA=null;function Nl(e){return U.isPlainObject(e)||U.isArray(e)}function av(e){return U.endsWith(e,"[]")?e.slice(0,-2):e}function _d(e,t,n){return e?e.concat(t).map(function(o,s){return o=av(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function QA(e){return U.isArray(e)&&!e.some(Nl)}const ZA=U.toFlatObject(U,{},null,function(t){return/^is[A-Z]/.test(t)});function ga(e,t,n){if(!U.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=U.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,y){return!U.isUndefined(y[d])});const r=n.metaTokens,o=n.visitor||c,s=n.dots,i=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&U.isSpecCompliantForm(t);if(!U.isFunction(o))throw new TypeError("visitor must be a function");function u(v){if(v===null)return"";if(U.isDate(v))return v.toISOString();if(!l&&U.isBlob(v))throw new He("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(v)||U.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function c(v,d,y){let g=v;if(v&&!y&&typeof v=="object"){if(U.endsWith(d,"{}"))d=r?d:d.slice(0,-2),v=JSON.stringify(v);else if(U.isArray(v)&&QA(v)||(U.isFileList(v)||U.endsWith(d,"[]"))&&(g=U.toArray(v)))return d=av(d),g.forEach(function(S,E){!(U.isUndefined(S)||S===null)&&t.append(i===!0?_d([d],E,s):i===null?d:d+"[]",u(S))}),!1}return Nl(v)?!0:(t.append(_d(y,d,s),u(v)),!1)}const f=[],p=Object.assign(ZA,{defaultVisitor:c,convertValue:u,isVisitable:Nl});function m(v,d){if(!U.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+d.join("."));f.push(v),U.forEach(v,function(g,_){(!(U.isUndefined(g)||g===null)&&o.call(t,g,U.isString(_)?_.trim():_,d,p))===!0&&m(g,d?d.concat(_):[_])}),f.pop()}}if(!U.isObject(e))throw new TypeError("data must be an object");return m(e),t}function wd(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Wu(e,t){this._pairs=[],e&&ga(e,this,t)}const lv=Wu.prototype;lv.append=function(t,n){this._pairs.push([t,n])};lv.toString=function(t){const n=t?function(r){return t.call(this,r,wd)}:wd;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function eP(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function uv(e,t,n){if(!t)return e;const r=n&&n.encode||eP,o=n&&n.serialize;let s;if(o?s=o(t,n):s=U.isURLSearchParams(t)?t.toString():new Wu(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class tP{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){U.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Sd=tP,cv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},nP=typeof URLSearchParams<"u"?URLSearchParams:Wu,rP=typeof FormData<"u"?FormData:null,oP=typeof Blob<"u"?Blob:null,sP=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),iP=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),En={isBrowser:!0,classes:{URLSearchParams:nP,FormData:rP,Blob:oP},isStandardBrowserEnv:sP,isStandardBrowserWebWorkerEnv:iP,protocols:["http","https","file","blob","url","data"]};function aP(e,t){return ga(e,new En.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,s){return En.isNode&&U.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function lP(e){return U.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function uP(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r=n.length;return i=!i&&U.isArray(o)?o.length:i,l?(U.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!U.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&U.isArray(o[i])&&(o[i]=uP(o[i])),!a)}if(U.isFormData(e)&&U.isFunction(e.entries)){const n={};return U.forEachEntry(e,(r,o)=>{t(lP(r),o,n,0)}),n}return null}const cP={"Content-Type":void 0};function fP(e,t,n){if(U.isString(e))try{return(t||JSON.parse)(e),U.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ya={transitional:cv,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=U.isObject(t);if(s&&U.isHTMLForm(t)&&(t=new FormData(t)),U.isFormData(t))return o&&o?JSON.stringify(fv(t)):t;if(U.isArrayBuffer(t)||U.isBuffer(t)||U.isStream(t)||U.isFile(t)||U.isBlob(t))return t;if(U.isArrayBufferView(t))return t.buffer;if(U.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return aP(t,this.formSerializer).toString();if((a=U.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ga(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),fP(t)):t}],transformResponse:[function(t){const n=this.transitional||ya.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(t&&U.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(a){if(i)throw a.name==="SyntaxError"?He.from(a,He.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:En.classes.FormData,Blob:En.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};U.forEach(["delete","get","head"],function(t){ya.headers[t]={}});U.forEach(["post","put","patch"],function(t){ya.headers[t]=U.merge(cP)});const Gu=ya,dP=U.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pP=e=>{const t={};let n,r,o;return e&&e.split(` `).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&dP[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ed=Symbol("internals");function Jo(e){return e&&String(e).trim().toLowerCase()}function vi(e){return e===!1||e==null?e:U.isArray(e)?e.map(vi):String(e)}function hP(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function mP(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function Ua(e,t,n,r,o){if(U.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!U.isString(t)){if(U.isString(r))return t.indexOf(r)!==-1;if(U.isRegExp(r))return r.test(t)}}function vP(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function gP(e,t){const n=U.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}class ba{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(a,l,u){const c=Jo(l);if(!c)throw new Error("header name must be a non-empty string");const f=U.findKey(o,c);(!f||o[f]===void 0||u===!0||u===void 0&&o[f]!==!1)&&(o[f||l]=vi(a))}const i=(a,l)=>U.forEach(a,(u,c)=>s(u,c,l));return U.isPlainObject(t)||t instanceof this.constructor?i(t,n):U.isString(t)&&(t=t.trim())&&!mP(t)?i(pP(t),n):t!=null&&s(n,t,r),this}get(t,n){if(t=Jo(t),t){const r=U.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return hP(o);if(U.isFunction(n))return n.call(this,o,r);if(U.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Jo(t),t){const r=U.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ua(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=Jo(i),i){const a=U.findKey(r,i);a&&(!n||Ua(r,r[a],a,n))&&(delete r[a],o=!0)}}return U.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Ua(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return U.forEach(this,(o,s)=>{const i=U.findKey(r,s);if(i){n[i]=vi(o),delete n[s];return}const a=t?vP(s):String(s).trim();a!==s&&delete n[s],n[a]=vi(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return U.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&U.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ed]=this[Ed]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=Jo(i);r[a]||(gP(o,i),r[a]=!0)}return U.isArray(t)?t.forEach(s):s(t),this}}ba.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);U.freezeMethods(ba.prototype);U.freezeMethods(ba);const Kn=ba;function Ka(e,t){const n=this||Gu,r=t||n,o=Kn.from(r.headers);let s=r.data;return U.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function dv(e){return!!(e&&e.__CANCEL__)}function js(e,t,n){He.call(this,e??"canceled",He.ERR_CANCELED,t,n),this.name="CanceledError"}U.inherits(js,He,{__CANCEL__:!0});function yP(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new He("Request failed with status code "+n.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const bP=En.isStandardBrowserEnv?function(){return{write:function(n,r,o,s,i,a){const l=[];l.push(n+"="+encodeURIComponent(r)),U.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),U.isString(s)&&l.push("path="+s),U.isString(i)&&l.push("domain="+i),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function _P(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function wP(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function pv(e,t){return e&&!_P(t)?wP(e,t):t}const SP=En.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(s){let i=s;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(i){const a=U.isString(i)?o(i):i;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function EP(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function CP(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=r[s];i||(i=u),n[o]=l,r[o]=u;let f=s,p=0;for(;f!==o;)p+=n[f++],f=f%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-i{const s=o.loaded,i=o.lengthComputable?o.total:void 0,a=s-n,l=r(a),u=s<=i;n=s;const c={loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&u?(i-s)/l:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const OP=typeof XMLHttpRequest<"u",TP=OP&&function(e){return new Promise(function(n,r){let o=e.data;const s=Kn.from(e.headers).normalize(),i=e.responseType;let a;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}U.isFormData(o)&&(En.isStandardBrowserEnv||En.isStandardBrowserWebWorkerEnv)&&s.setContentType(!1);let u=new XMLHttpRequest;if(e.auth){const m=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(m+":"+v))}const c=pv(e.baseURL,e.url);u.open(e.method.toUpperCase(),uv(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function f(){if(!u)return;const m=Kn.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),d={data:!i||i==="text"||i==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:m,config:e,request:u};yP(function(g){n(g),l()},function(g){r(g),l()},d),u=null}if("onloadend"in u?u.onloadend=f:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(f)},u.onabort=function(){u&&(r(new He("Request aborted",He.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new He("Network Error",He.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let v=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const d=e.transitional||cv;e.timeoutErrorMessage&&(v=e.timeoutErrorMessage),r(new He(v,d.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,e,u)),u=null},En.isStandardBrowserEnv){const m=(e.withCredentials||SP(c))&&e.xsrfCookieName&&bP.read(e.xsrfCookieName);m&&s.set(e.xsrfHeaderName,m)}o===void 0&&s.setContentType(null),"setRequestHeader"in u&&U.forEach(s.toJSON(),function(v,d){u.setRequestHeader(d,v)}),U.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),i&&i!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",Cd(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",Cd(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=m=>{u&&(r(!m||m.type?new js(null,e,u):m),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const p=EP(c);if(p&&En.protocols.indexOf(p)===-1){r(new He("Unsupported protocol "+p+":",He.ERR_BAD_REQUEST,e));return}u.send(o||null)})},gi={http:XA,xhr:TP};U.forEach(gi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const xP={getAdapter:e=>{e=U.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;oe instanceof Kn?e.toJSON():e;function Co(e,t){t=t||{};const n={};function r(u,c,f){return U.isPlainObject(u)&&U.isPlainObject(c)?U.merge.call({caseless:f},u,c):U.isPlainObject(c)?U.merge({},c):U.isArray(c)?c.slice():c}function o(u,c,f){if(U.isUndefined(c)){if(!U.isUndefined(u))return r(void 0,u,f)}else return r(u,c,f)}function s(u,c){if(!U.isUndefined(c))return r(void 0,c)}function i(u,c){if(U.isUndefined(c)){if(!U.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,f){if(f in t)return r(u,c);if(f in e)return r(void 0,u)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,c)=>o(Td(u),Td(c),!0)};return U.forEach(Object.keys(e).concat(Object.keys(t)),function(c){const f=l[c]||o,p=f(e[c],t[c],c);U.isUndefined(p)&&f!==a||(n[c]=p)}),n}const hv="1.3.4",Ju={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ju[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const xd={};Ju.transitional=function(t,n,r){function o(s,i){return"[Axios v"+hv+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new He(o(i," has been removed"+(n?" in "+n:"")),He.ERR_DEPRECATED);return n&&!xd[i]&&(xd[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,a):!0}};function $P(e,t,n){if(typeof e!="object")throw new He("options must be an object",He.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const a=e[s],l=a===void 0||i(a,s,e);if(l!==!0)throw new He("option "+s+" must be "+l,He.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new He("Unknown option "+s,He.ERR_BAD_OPTION)}}const Ll={assertOptions:$P,validators:Ju},sr=Ll.validators;class Mi{constructor(t){this.defaults=t,this.interceptors={request:new Sd,response:new Sd}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Co(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&Ll.assertOptions(r,{silentJSONParsing:sr.transitional(sr.boolean),forcedJSONParsing:sr.transitional(sr.boolean),clarifyTimeoutError:sr.transitional(sr.boolean)},!1),o!==void 0&&Ll.assertOptions(o,{encode:sr.function,serialize:sr.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i;i=s&&U.merge(s.common,s[n.method]),i&&U.forEach(["delete","get","head","post","put","patch","common"],v=>{delete s[v]}),n.headers=Kn.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(n)===!1||(l=l&&d.synchronous,a.unshift(d.fulfilled,d.rejected))});const u=[];this.interceptors.response.forEach(function(d){u.push(d.fulfilled,d.rejected)});let c,f=0,p;if(!l){const v=[Od.bind(this),void 0];for(v.unshift.apply(v,a),v.push.apply(v,u),p=v.length,c=Promise.resolve(n);f{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,a){r.reason||(r.reason=new js(s,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Yu(function(o){t=o}),cancel:t}}}const AP=Yu;function PP(e){return function(n){return e.apply(null,n)}}function kP(e){return U.isObject(e)&&e.isAxiosError===!0}const Ml={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ml).forEach(([e,t])=>{Ml[t]=e});const IP=Ml;function mv(e){const t=new yi(e),n=Ym(yi.prototype.request,t);return U.extend(n,yi.prototype,t,{allOwnKeys:!0}),U.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return mv(Co(e,o))},n}const vt=mv(Gu);vt.Axios=yi;vt.CanceledError=js;vt.CancelToken=AP;vt.isCancel=dv;vt.VERSION=hv;vt.toFormData=ga;vt.AxiosError=He;vt.Cancel=vt.CanceledError;vt.all=function(t){return Promise.all(t)};vt.spread=PP;vt.isAxiosError=kP;vt.mergeConfig=Co;vt.AxiosHeaders=Kn;vt.formToJSON=e=>fv(U.isHTMLForm(e)?new FormData(e):e);vt.HttpStatusCode=IP;vt.default=vt;const RP=vt,NP=1e3,LP=e=>{throw bt({message:`请求发生了错误,请检查你的后端地址,填写是否正确,或者 阅读APP -确认开启web服务`,type:"error"}),e},Xn=RP.create({baseURL:"",timeout:5*NP});Xn.interceptors.response.use(e=>e,LP);const zs=/bookSource/i.test(location.href),{hostname:MP,port:FP}=new URL(""),BP=()=>zs?Xn.get("getBookSources"):Xn.get("getRssSources"),DP=e=>zs?Xn.post("saveBookSource",e):Xn.post("saveRssSource",e),jP=e=>zs?Xn.post("saveBookSources",e):Xn.post("saveRssSources",e),zP=e=>zs?Xn.post("deleteBookSources",e):Xn.post("deleteRssSources",e),HP=(e,t,n,r)=>{const o=`ws://${MP}:${Number(FP)+1}/${zs?"bookSource":"rssSource"}Debug`,s=new WebSocket(o);s.onopen=()=>{s.send(`{"tag":"${e}", "key":"${t}"}`)},s.onmessage=({data:i})=>n(i),s.onclose=()=>{bt({message:"调试已关闭!",type:"info"}),r()}},ls={getSources:BP,saveSources:jP,saveSource:DP,deleteSource:zP,debug:HP},VP={__name:"editDebug",setup(e){const t=jo(),n=V(""),r=V("");qi(()=>{t.isDebuging&&s()});const o=a=>{let l=document.querySelector("#debug-text");l.scrollTop=l.scrollHeight,n.value+=a+` +确认开启web服务`,type:"error"}),e},Xn=RP.create({baseURL:location.origin,timeout:5*NP});Xn.interceptors.response.use(e=>e,LP);const zs=/bookSource/i.test(location.href),{hostname:MP,port:FP}=new URL(location.href),BP=()=>zs?Xn.get("getBookSources"):Xn.get("getRssSources"),DP=e=>zs?Xn.post("saveBookSource",e):Xn.post("saveRssSource",e),jP=e=>zs?Xn.post("saveBookSources",e):Xn.post("saveRssSources",e),zP=e=>zs?Xn.post("deleteBookSources",e):Xn.post("deleteRssSources",e),HP=(e,t,n,r)=>{const o=`ws://${MP}:${Number(FP)+1}/${zs?"bookSource":"rssSource"}Debug`,s=new WebSocket(o);s.onopen=()=>{s.send(`{"tag":"${e}", "key":"${t}"}`)},s.onmessage=({data:i})=>n(i),s.onclose=()=>{bt({message:"调试已关闭!",type:"info"}),r()}},ls={getSources:BP,saveSources:jP,saveSource:DP,deleteSource:zP,debug:HP},VP={__name:"editDebug",setup(e){const t=jo(),n=V(""),r=V("");qi(()=>{t.isDebuging&&s()});const o=a=>{let l=document.querySelector("#debug-text");l.scrollTop=l.scrollHeight,n.value+=a+` `},s=async()=>{n.value="",await ls.saveSource(t.currentSource),ls.debug(t.currentSourceUrl,r.value||t.searchKey,o,t.debugFinish)},i=T(()=>/bookSource/.test(window.location.href));return(a,l)=>{const u=Bo;return $(),W(Re,null,[h(i)?($(),se(u,{key:0,id:"debug-key",modelValue:h(r),"onUpdate:modelValue":l[0]||(l[0]=c=>Be(r)?r.value=c:null),placeholder:"搜索书名、作者","prefix-icon":h(Nh),style:{"padding-bottom":"4px"},onKeydown:_t(s,["enter"])},null,8,["modelValue","prefix-icon","onKeydown"])):ue("",!0),Q(u,{id:"debug-text",modelValue:h(n),"onUpdate:modelValue":l[1]||(l[1]=c=>Be(n)?n.value=c:null),type:"textarea",readonly:"",rows:"29",placeholder:"这里用于输出调试信息"},null,8,["modelValue"])],64)}}},UP={__name:"editTab",setup(e){const t=jo(),n=V(""),r=async o=>{try{t.changeEditTabSource(JSON.parse(o))}catch{bt({message:"粘贴的源格式错误",type:"error"})}};return qi(async()=>{let o=t.editTabSource;Object.keys(o).length>0?n.value=JSON.stringify(o,null,4):n.value=""}),(o,s)=>{const i=Bo;return $(),se(i,{modelValue:h(n),"onUpdate:modelValue":s[0]||(s[0]=a=>Be(n)?n.value=a:null),type:"textarea",placeholder:"这里输出序列化的JSON数据,可直接导入'阅读'APP",rows:"30",onChange:r,style:{"margin-bottom":"4px"}},null,8,["modelValue"])}}},KP={__name:"editOut",setup(e){const t=jo(),{currentTab:n}=Vu(t),r=V([["editTab","编辑源"],["editDebug","调试源"],["editList","源列表"],["editHelp","帮助信息"]]);return(o,s)=>{const i=UP,a=VP,l=bA,u=iA,c=zm,f=jm;return $(),se(f,{modelValue:h(n),"onUpdate:modelValue":s[0]||(s[0]=p=>Be(n)?n.value=p:null)},{default:ee(()=>[($(!0),W(Re,null,cn(h(r),(p,m)=>($(),se(c,{key:p[0],name:p[0],label:p[1]},{default:ee(()=>[m==0?($(),se(i,{key:0})):ue("",!0),m==1?($(),se(a,{key:1})):ue("",!0),m==2?($(),se(l,{key:2})):ue("",!0),m==3?($(),se(u,{key:3})):ue("",!0)]),_:2},1032,["name","label"]))),128))]),_:1},8,["modelValue"])}}};var Wa=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Ga(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function vv(e,t){for(var n=t.slice(0,t.length-1),r=0;r=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function qP(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,o=!0,s=0;s=0&&Ze.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&Ze.splice(0,Ze.length),(t===93||t===224)&&(t=91),t in wt){wt[t]=!1;for(var r in Pn)Pn[r]===t&&(Ht[r]=!1)}}function t6(e){if(typeof e>"u")Object.keys(ut).forEach(function(i){return delete ut[i]});else if(Array.isArray(e))e.forEach(function(i){i.key&&Ja(i)});else if(typeof e=="object")e.key&&Ja(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?vv(Pn,u):[];ut[p]=ut[p].filter(function(v){var d=o?v.method===o:!0;return!(d&&v.scope===r&&qP(v.mods,m))})}})};function Ad(e,t,n,r){if(t.element===r){var o;if(t.scope===n||t.scope==="all"){o=t.mods.length>0;for(var s in wt)Object.prototype.hasOwnProperty.call(wt,s)&&(!wt[s]&&t.mods.indexOf(+s)>-1||wt[s]&&t.mods.indexOf(+s)===-1)&&(o=!1);(t.mods.length===0&&!wt[16]&&!wt[18]&&!wt[17]&&!wt[91]||o||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function Pd(e,t){var n=ut["*"],r=e.keyCode||e.which||e.charCode;if(Ht.filter.call(this,e)){if((r===93||r===224)&&(r=91),Ze.indexOf(r)===-1&&r!==229&&Ze.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(v){var d=Fl[v];e[v]&&Ze.indexOf(d)===-1?Ze.push(d):!e[v]&&Ze.indexOf(d)>-1?Ze.splice(Ze.indexOf(d),1):v==="metaKey"&&e[v]&&Ze.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Ze=Ze.slice(Ze.indexOf(d))))}),r in wt){wt[r]=!0;for(var o in Pn)Pn[o]===r&&(Ht[o]=!0);if(!n)return}for(var s in wt)Object.prototype.hasOwnProperty.call(wt,s)&&(wt[s]=e[Fl[s]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Ze.indexOf(17)===-1&&Ze.push(17),Ze.indexOf(18)===-1&&Ze.push(18),wt[17]=!0,wt[18]=!0);var i=ks();if(n)for(var a=0;a-1}function Ht(e,t,n){Ze=[];var r=gv(e),o=[],s="all",i=document,a=0,l=!1,u=!0,c="+",f=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(s=t.scope),t.element&&(i=t.element),t.keyup&&(l=t.keyup),t.keydown!==void 0&&(u=t.keydown),t.capture!==void 0&&(f=t.capture),typeof t.splitKey=="string"&&(c=t.splitKey)),typeof t=="string"&&(s=t);a1&&(o=vv(Pn,e)),e=e[e.length-1],e=e==="*"?"*":_a(e),e in ut||(ut[e]=[]),ut[e].push({keyup:l,keydown:u,scope:s,mods:o,shortcut:r[a],method:n,key:r[a],splitKey:c,element:i});typeof i<"u"&&!n6(i)&&window&&(bv.push(i),Ga(i,"keydown",function(p){Pd(p,i)},f),$d||($d=!0,Ga(window,"focus",function(){Ze=[]},f)),Ga(i,"keyup",function(p){Pd(p,i),e6(p)},f))}function r6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(ut).forEach(function(n){var r=ut[n].filter(function(o){return o.scope===t&&o.shortcut===e});r.forEach(function(o){o&&o.method&&o.method()})})}var Ya={getPressedKeyString:YP,setScope:_v,getScope:ks,deleteScope:ZP,getPressedKeyCodes:JP,isPressed:QP,filter:XP,trigger:r6,unbind:t6,keyMap:Ps,modifier:Pn,modifierMap:Fl};for(var Xa in Ya)Object.prototype.hasOwnProperty.call(Ya,Xa)&&(Ht[Xa]=Ya[Xa]);if(typeof window<"u"){var o6=window.hotkeys;Ht.noConflict=function(e){return e&&window.hotkeys===Ht&&(window.hotkeys=o6),Ht},window.hotkeys=Ht}const s6={class:"menu flex-column-center"},i6={class:"hotkeys-header flex-space-between"},a6=["id"],l6={key:0},u6={class:"hotkeys-settings flex-column-center"},c6={class:"title"},f6={class:"hotkeys-item__content"},d6={key:0},p6={key:0},h6={__name:"toolBar",setup(e){const t=jo(),n=()=>{ls.getSources().then(({data:E})=>{E.isSuccess?(t.changeTabName("editList"),t.saveSources(E.data),bt({message:`成功拉取${E.data.length}条源`,type:"success"})):bt({message:E.errorMsg??"后端错误",type:"error"})})},r=()=>{let E=t.sources;if(t.changeTabName("editList"),E.length===0)return bt({message:"空空如也",type:"info"});bt({message:"正在推送中",type:"info"}),ls.saveSources(E).then(({data:w})=>{if(w.isSuccess){let x=w.data;if(Array.isArray(x)){let C="";E.length>x.length&&(C=` 推送失败的源将用红色字体标注!`,t.setPushReturnSources(x)),bt({message:`批量推送源到「阅读3.0APP」 共计: ${E.length} 条 diff --git a/app/src/main/assets/web/source/index.html b/app/src/main/assets/web/source/index.html index 88bba60ab..b712f5312 100644 --- a/app/src/main/assets/web/source/index.html +++ b/app/src/main/assets/web/source/index.html @@ -1 +1 @@ -legado_web_vue
\ No newline at end of file +legado_web_vue
\ No newline at end of file