rssany 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/app/plugins/builtin/xiaohongshu.rssany.js +59 -2
  2. package/app/webui/build/200.html +51 -0
  3. package/app/webui/build/_app/env.js +1 -0
  4. package/app/webui/build/_app/immutable/assets/0.BLOTwIuF.css +1 -0
  5. package/app/webui/build/_app/immutable/assets/10.Dj8_pmut.css +1 -0
  6. package/app/webui/build/_app/immutable/assets/11.qYZMiTb0.css +1 -0
  7. package/app/webui/build/_app/immutable/assets/12.DfJcfUWl.css +1 -0
  8. package/app/webui/build/_app/immutable/assets/13.Qu_tY6H9.css +1 -0
  9. package/app/webui/build/_app/immutable/assets/14.DfMfOrS3.css +1 -0
  10. package/app/webui/build/_app/immutable/assets/15.nNGjXhCQ.css +1 -0
  11. package/app/webui/build/_app/immutable/assets/16.Cw9oSkcO.css +1 -0
  12. package/app/webui/build/_app/immutable/assets/4.Di6rvlY-.css +1 -0
  13. package/app/webui/build/_app/immutable/assets/5.B-dPiwB7.css +1 -0
  14. package/app/webui/build/_app/immutable/assets/6.B27N7pdA.css +1 -0
  15. package/app/webui/build/_app/immutable/assets/7.CrNxmd8B.css +1 -0
  16. package/app/webui/build/_app/immutable/assets/8.Cgji2b15.css +1 -0
  17. package/app/webui/build/_app/immutable/assets/9.BsCIAvn3.css +1 -0
  18. package/app/webui/build/_app/immutable/assets/BackToParentRoute.DGk-X5ow.css +1 -0
  19. package/app/webui/build/_app/immutable/assets/SourcesList.D5Lso0bo.css +1 -0
  20. package/app/webui/build/_app/immutable/assets/homeFeedPanelStore.CE6xTfsa.css +1 -0
  21. package/app/webui/build/_app/immutable/chunks/6prdYIKP.js +1 -0
  22. package/app/webui/build/_app/immutable/chunks/B-CeeY89.js +1 -0
  23. package/app/webui/build/_app/immutable/chunks/B2cyTHdf.js +2 -0
  24. package/app/webui/build/_app/immutable/chunks/B6WG2Sd3.js +1 -0
  25. package/app/webui/build/_app/immutable/chunks/BA4Gucnq.js +1 -0
  26. package/app/webui/build/_app/immutable/chunks/BAJAS8BI.js +1 -0
  27. package/app/webui/build/_app/immutable/chunks/BUApaBEI.js +1 -0
  28. package/app/webui/build/_app/immutable/chunks/BXTsojX2.js +36 -0
  29. package/app/webui/build/_app/immutable/chunks/Bfc47y5P.js +1 -0
  30. package/app/webui/build/_app/immutable/chunks/BkD3yAYe.js +1 -0
  31. package/app/webui/build/_app/immutable/chunks/Brun6sCr.js +36 -0
  32. package/app/webui/build/_app/immutable/chunks/C4uF_YIK.js +1 -0
  33. package/app/webui/build/_app/immutable/chunks/C8umpVpB.js +1 -0
  34. package/app/webui/build/_app/immutable/chunks/CBY2biv-.js +1 -0
  35. package/app/webui/build/_app/immutable/chunks/CFwxUBGi.js +1 -0
  36. package/app/webui/build/_app/immutable/chunks/CGCMIfh3.js +1 -0
  37. package/app/webui/build/_app/immutable/chunks/CS53ooo0.js +1 -0
  38. package/app/webui/build/_app/immutable/chunks/ChUctqXA.js +1 -0
  39. package/app/webui/build/_app/immutable/chunks/ClknbeNl.js +1 -0
  40. package/app/webui/build/_app/immutable/chunks/D6kzEN_P.js +6 -0
  41. package/app/webui/build/_app/immutable/chunks/DAV9bzjw.js +1 -0
  42. package/app/webui/build/_app/immutable/chunks/DAdOEnFb.js +1 -0
  43. package/app/webui/build/_app/immutable/chunks/DCEayuDt.js +1 -0
  44. package/app/webui/build/_app/immutable/chunks/DL3Q5sfb.js +1 -0
  45. package/app/webui/build/_app/immutable/chunks/DVa8Y-mQ.js +1 -0
  46. package/app/webui/build/_app/immutable/chunks/DXDBlEGf.js +1 -0
  47. package/app/webui/build/_app/immutable/chunks/DoRPmqLn.js +2 -0
  48. package/app/webui/build/_app/immutable/chunks/Dr67pd7v.js +1 -0
  49. package/app/webui/build/_app/immutable/chunks/DsxvjlCC.js +13 -0
  50. package/app/webui/build/_app/immutable/chunks/Dyvi1wBH.js +1 -0
  51. package/app/webui/build/_app/immutable/chunks/hp4PFHFv.js +1 -0
  52. package/app/webui/build/_app/immutable/chunks/vtBo8kBV.js +1 -0
  53. package/app/webui/build/_app/immutable/entry/app.dq7-6soi.js +2 -0
  54. package/app/webui/build/_app/immutable/entry/start.BnoTfBrB.js +1 -0
  55. package/app/webui/build/_app/immutable/nodes/0.CQDkqUeN.js +11 -0
  56. package/app/webui/build/_app/immutable/nodes/1.BUa24rXB.js +1 -0
  57. package/app/webui/build/_app/immutable/nodes/10.MZgVhpGF.js +1 -0
  58. package/app/webui/build/_app/immutable/nodes/11.B39IbrZ0.js +1 -0
  59. package/app/webui/build/_app/immutable/nodes/12.B5B81dLQ.js +1 -0
  60. package/app/webui/build/_app/immutable/nodes/13.DWWcH27k.js +6 -0
  61. package/app/webui/build/_app/immutable/nodes/14.Db6eOPqq.js +1 -0
  62. package/app/webui/build/_app/immutable/nodes/15.B2jiP2VJ.js +1 -0
  63. package/app/webui/build/_app/immutable/nodes/16.p6WfP435.js +24 -0
  64. package/app/webui/build/_app/immutable/nodes/17.BtYZF6FM.js +1 -0
  65. package/app/webui/build/_app/immutable/nodes/18.BIzqhTqv.js +1 -0
  66. package/app/webui/build/_app/immutable/nodes/2.AJd2163d.js +1 -0
  67. package/app/webui/build/_app/immutable/nodes/3.BZQeL-vz.js +1 -0
  68. package/app/webui/build/_app/immutable/nodes/4.BT_N8pCh.js +2 -0
  69. package/app/webui/build/_app/immutable/nodes/5.Bo_ftyqW.js +2 -0
  70. package/app/webui/build/_app/immutable/nodes/6.vOowdQUr.js +1 -0
  71. package/app/webui/build/_app/immutable/nodes/7.BfVbBKZu.js +1 -0
  72. package/app/webui/build/_app/immutable/nodes/8.BslYG5f2.js +1 -0
  73. package/app/webui/build/_app/immutable/nodes/9.DAgT-df2.js +1 -0
  74. package/app/webui/build/_app/version.json +1 -0
  75. package/app/webui/build/apple-touch-icon.png +0 -0
  76. package/app/webui/build/favicon.ico +0 -0
  77. package/app/webui/build/favicon.png +0 -0
  78. package/dist/index.js +47 -3
  79. package/dist/index.js.map +1 -1
  80. package/package.json +10 -11
  81. package/scripts/dev.mjs +5 -1
@@ -0,0 +1,36 @@
1
+ var Cr=Object.defineProperty;var vs=d=>{throw TypeError(d)};var kr=(d,e,r)=>e in d?Cr(d,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):d[e]=r;var be=(d,e,r)=>kr(d,typeof e!="symbol"?e+"":e,r),Do=(d,e,r)=>e.has(d)||vs("Cannot "+r);var h=(d,e,r)=>(Do(d,e,"read from private field"),r?r.call(d):e.get(d)),$=(d,e,r)=>e.has(d)?vs("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(d):e.set(d,r),T=(d,e,r,p)=>(Do(d,e,"write to private field"),p?p.call(d,r):e.set(d,r),r),C=(d,e,r)=>(Do(d,e,"access private method"),r);import{p as Fs,c as oe,a as y,f as M,t as zt}from"./CS53ooo0.js";import"./BA4Gucnq.js";import{o as zr}from"./Dyvi1wBH.js";import{b7 as Ge,i as t,a5 as n,aA as Se,at as yo,f as N,au as bo,av as f,aj as vo,ax as c,aC as Vt,aD as Pr,aw as v,ay as pe,az as _e,U as x,u as Fe,z as P,aq as Ao}from"./vtBo8kBV.js";import{o as jt,d as xr,a as ie,s as ze,e as $r,r as Tr}from"./B2cyTHdf.js";import{s as Sr,a as ms}from"./B6WG2Sd3.js";import{i as he}from"./BkD3yAYe.js";import{e as Fo,i as ys}from"./CFwxUBGi.js";import{d as Ut,r as Pt,a as xt,e as Or,s as No}from"./DoRPmqLn.js";import{b as $t}from"./C8umpVpB.js";import{i as Mr}from"./DVa8Y-mQ.js";import{g as bs}from"./ClknbeNl.js";import{p as Io}from"./DXDBlEGf.js";import{s as Tt}from"./CGCMIfh3.js";import{R as Dr,M as Ar,P as Fr,a as Nr,h as _s,S as Ir,b as Hr,r as Lr,s as Er,c as Wr}from"./Brun6sCr.js";import{a as Ne}from"./CBY2biv-.js";import{D as gs,a as ws,b as Cs,c as ks,d as co}from"./DAdOEnFb.js";import{P as Vr}from"./D6kzEN_P.js";import{w as Yo,j as jr,k as it,C as Ur,a as zs,b as fe,d as Ns,l as Kr,p as mo,E as Br,S as qr,g as Is,q as Jr,r as Xr,c as Yr,f as Hs,n as St,m as ho,s as lt,I as pt,P as po}from"./DsxvjlCC.js";import{s as ht}from"./ChUctqXA.js";import{p as B,s as Ve,r as Ls,l as ft}from"./BAJAS8BI.js";import{P as Qr,a as Gr,g as Ps,F as Zr,b as Rr}from"./6prdYIKP.js";function Ho(d,e){const[r,p]=d;let u=!1;const l=e.length;for(let m=0,_=l-1;m<l;_=m++){const[q,se]=e[m]??[0,0],[Te,Z]=e[_]??[0,0];se>=p!=Z>=p&&r<=(Te-q)*(p-se)/(Z-se)+q&&(u=!u)}return u}function Lo(d,e){return d[0]>=e.left&&d[0]<=e.right&&d[1]>=e.top&&d[1]<=e.bottom}function xs(d,e){const r=d.left+d.width/2,p=d.top+d.height/2,u=e.left+e.width/2,l=e.top+e.height/2,m=u-r,_=l-p;return Math.abs(m)>Math.abs(_)?m>0?"right":"left":_>0?"bottom":"top"}var Re,Ot,Mt,He,ge,ut,ct,et,tt,z,fo,Eo,Wo,Es,Ws,Ie,Vo,Vs,js;class en{constructor(e){$(this,z);$(this,Re);$(this,Ot);$(this,Mt);$(this,He,null);$(this,ge,null);$(this,ut,[]);$(this,ct,null);$(this,et,null);$(this,tt,null);T(this,Re,e),T(this,Ot,e.buffer??1);const r=e.transitIntentTimeout;T(this,Mt,typeof r=="number"&&r>0?r:null),Yo([e.triggerNode,e.contentNode,e.enabled],([p,u,l])=>{if(!p||!u||!l){T(this,ct,null),C(this,z,Ie).call(this);return}h(this,ct)&&h(this,ct)!==p&&C(this,z,Ie).call(this),T(this,ct,p);const m=jr(p),_=A=>{C(this,z,Ws).call(this,[A.clientX,A.clientY],p,u)},q=A=>{var Oe,R;const L=A.relatedTarget;if(it(L)&&u.contains(L))return;const K=((R=(Oe=h(this,Re)).ignoredTargets)==null?void 0:R.call(Oe))??[];it(L)&&K.some(W=>W===L||W.contains(L))||(T(this,ut,it(L)&&K.length>0?K.filter(W=>L.contains(W)):[]),T(this,He,[A.clientX,A.clientY]),T(this,ge,"content"),C(this,z,Eo).call(this))},se=()=>{C(this,z,Ie).call(this)},Te=()=>{C(this,z,Ie).call(this)},Z=A=>{const L=A.relatedTarget;it(L)&&p.contains(L)||(T(this,He,[A.clientX,A.clientY]),T(this,ge,"trigger"),C(this,z,Eo).call(this))};return[jt(m,"pointermove",_),jt(p,"pointerleave",q),jt(p,"pointerenter",se),jt(u,"pointerenter",Te),jt(u,"pointerleave",Z)].reduce((A,L)=>()=>{A(),L()},()=>{})})}}Re=new WeakMap,Ot=new WeakMap,Mt=new WeakMap,He=new WeakMap,ge=new WeakMap,ut=new WeakMap,ct=new WeakMap,et=new WeakMap,tt=new WeakMap,z=new WeakSet,fo=function(){h(this,et)!==null&&(cancelAnimationFrame(h(this,et)),T(this,et,null))},Eo=function(){C(this,z,fo).call(this),T(this,et,requestAnimationFrame(()=>{T(this,et,null),!(!h(this,He)||!h(this,ge))&&(C(this,z,Ie).call(this),h(this,Re).onPointerExit())}))},Wo=function(){h(this,tt)!==null&&(clearTimeout(h(this,tt)),T(this,tt,null))},Es=function(){h(this,Mt)!==null&&(C(this,z,Wo).call(this),T(this,tt,window.setTimeout(()=>{T(this,tt,null),!(!h(this,He)||!h(this,ge))&&(C(this,z,Ie).call(this),h(this,Re).onPointerExit())},h(this,Mt))))},Ws=function(e,r,p){if(!h(this,He)||!h(this,ge))return;C(this,z,fo).call(this),C(this,z,Es).call(this);const u=r.getBoundingClientRect(),l=p.getBoundingClientRect();if(h(this,ge)==="content"&&Lo(e,l)){C(this,z,Ie).call(this);return}if(h(this,ge)==="trigger"&&Lo(e,u)){C(this,z,Ie).call(this);return}if(h(this,ge)==="content"&&h(this,ut).length>0)for(const Te of h(this,ut)){const Z=Te.getBoundingClientRect();if(Lo(e,Z))return;const A=xs(u,Z),L=C(this,z,Vo).call(this,u,Z,A);if(L&&Ho(e,L))return}const m=xs(u,l),_=C(this,z,Vo).call(this,u,l,m);if(_&&Ho(e,_))return;const q=h(this,ge)==="content"?l:u,se=C(this,z,Vs).call(this,h(this,He),q,m,h(this,ge));Ho(e,se)||(C(this,z,Ie).call(this),h(this,Re).onPointerExit())},Ie=function(){T(this,He,null),T(this,ge,null),T(this,ut,[]),C(this,z,fo).call(this),C(this,z,Wo).call(this)},Vo=function(e,r,p){const u=h(this,Ot);switch(p){case"top":return[[Math.min(e.left,r.left)-u,e.top],[Math.min(e.left,r.left)-u,r.bottom],[Math.max(e.right,r.right)+u,r.bottom],[Math.max(e.right,r.right)+u,e.top]];case"bottom":return[[Math.min(e.left,r.left)-u,e.bottom],[Math.min(e.left,r.left)-u,r.top],[Math.max(e.right,r.right)+u,r.top],[Math.max(e.right,r.right)+u,e.bottom]];case"left":return[[e.left,Math.min(e.top,r.top)-u],[r.right,Math.min(e.top,r.top)-u],[r.right,Math.max(e.bottom,r.bottom)+u],[e.left,Math.max(e.bottom,r.bottom)+u]];case"right":return[[e.right,Math.min(e.top,r.top)-u],[r.left,Math.min(e.top,r.top)-u],[r.left,Math.max(e.bottom,r.bottom)+u],[e.right,Math.max(e.bottom,r.bottom)+u]]}},Vs=function(e,r,p,u){const l=h(this,Ot)*4,[m,_]=e;switch(u==="trigger"?C(this,z,js).call(this,p):p){case"top":return[[m-l,_+l],[m+l,_+l],[r.right+l,r.bottom],[r.right+l,r.top],[r.left-l,r.top],[r.left-l,r.bottom]];case"bottom":return[[m-l,_-l],[m+l,_-l],[r.right+l,r.top],[r.right+l,r.bottom],[r.left-l,r.bottom],[r.left-l,r.top]];case"left":return[[m+l,_-l],[m+l,_+l],[r.right,r.bottom+l],[r.left,r.bottom+l],[r.left,r.top-l],[r.right,r.top-l]];case"right":return[[m-l,_-l],[m-l,_+l],[r.left,r.bottom+l],[r.right,r.bottom+l],[r.right,r.top-l],[r.left,r.top-l]]}},js=function(e){switch(e){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}};const jo=Yr({component:"popover",parts:["root","trigger","content","close","overlay"]}),Qo=new Ur("Popover.Root");var Kt,Bt,qt,Jt,Xt,Yt,Qt,ot,st,Le,Ze;const Go=class Go{constructor(e){$(this,Le);be(this,"opts");$(this,Kt,Ge(null));be(this,"contentPresence");$(this,Bt,Ge(null));$(this,qt,Ge(null));be(this,"overlayPresence");$(this,Jt,Ge(!1));$(this,Xt,Ge(!1));$(this,Yt,Ge(!1));$(this,Qt,Ge(0));$(this,ot,null);$(this,st,null);this.opts=e,this.contentPresence=new zs({ref:fe(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new zs({ref:fe(()=>this.overlayNode),open:this.opts.open}),Yo(()=>this.opts.open.current,r=>{r||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,C(this,Le,Ze).call(this))})}static create(e){return Qo.set(new Go(e))}get contentNode(){return t(h(this,Kt))}set contentNode(e){n(h(this,Kt),e,!0)}get triggerNode(){return t(h(this,Bt))}set triggerNode(e){n(h(this,Bt),e,!0)}get overlayNode(){return t(h(this,qt))}set overlayNode(e){n(h(this,qt),e,!0)}get openedViaHover(){return t(h(this,Jt))}set openedViaHover(e){n(h(this,Jt),e,!0)}get hasInteractedWithContent(){return t(h(this,Xt))}set hasInteractedWithContent(e){n(h(this,Xt),e,!0)}get hoverCooldown(){return t(h(this,Yt))}set hoverCooldown(e){n(h(this,Yt),e,!0)}get closeDelay(){return t(h(this,Qt))}set closeDelay(e){n(h(this,Qt),e,!0)}setDomContext(e){T(this,st,e)}toggleOpen(){C(this,Le,Ze).call(this),this.opts.open.current=!this.opts.open.current}handleClose(){C(this,Le,Ze).call(this),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){C(this,Le,Ze).call(this),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(C(this,Le,Ze).call(this),this.closeDelay<=0?this.opts.open.current=!1:h(this,st)&&T(this,ot,h(this,st).setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),T(this,ot,null)},this.closeDelay))))}cancelDelayedClose(){C(this,Le,Ze).call(this)}markInteraction(){this.hasInteractedWithContent=!0,C(this,Le,Ze).call(this)}};Kt=new WeakMap,Bt=new WeakMap,qt=new WeakMap,Jt=new WeakMap,Xt=new WeakMap,Yt=new WeakMap,Qt=new WeakMap,ot=new WeakMap,st=new WeakMap,Le=new WeakSet,Ze=function(){h(this,ot)!==null&&h(this,st)&&(h(this,st).clearTimeout(h(this,ot)),T(this,ot,null))};let Uo=Go;var rt,Dt,dt,Pe,Bo,qo,Jo,Us,Gt;const Zo=class Zo{constructor(e,r){$(this,Pe);be(this,"opts");be(this,"root");be(this,"attachment");be(this,"domContext");$(this,rt,null);$(this,Dt,null);$(this,dt,Ge(!1));$(this,Gt,Se(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Jr(this.root.opts.open.current),"data-state":Is(this.root.opts.open.current),"aria-controls":C(this,Pe,Us).call(this),[jo.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment})));this.opts=e,this.root=r,this.attachment=Ns(this.opts.ref,p=>this.root.triggerNode=p),this.domContext=new Kr(e.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),Yo(()=>this.opts.closeDelay.current,p=>{this.root.closeDelay=p})}static create(e){return new Zo(e,Qo.get())}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||mo(e)||(n(h(this,dt),!0),C(this,Pe,qo).call(this),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const r=this.opts.openDelay.current;r<=0?this.root.handleHoverOpen():T(this,rt,this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),T(this,rt,null)},r))}onpointerleave(e){this.opts.disabled.current||this.opts.openOnHover.current&&(mo(e)||(n(h(this,dt),!1),C(this,Pe,Bo).call(this),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(C(this,Pe,Jo).call(this),t(h(this,dt))&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}t(h(this,dt))&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===Br||e.key===qr)&&(e.preventDefault(),C(this,Pe,Jo).call(this),this.root.toggleOpen())}get props(){return t(h(this,Gt))}set props(e){n(h(this,Gt),e)}};rt=new WeakMap,Dt=new WeakMap,dt=new WeakMap,Pe=new WeakSet,Bo=function(){h(this,rt)!==null&&(this.domContext.clearTimeout(h(this,rt)),T(this,rt,null))},qo=function(){h(this,Dt)!==null&&(this.domContext.clearTimeout(h(this,Dt)),T(this,Dt,null))},Jo=function(){C(this,Pe,Bo).call(this),C(this,Pe,qo).call(this)},Us=function(){var e,r;if(this.root.opts.open.current&&((e=this.root.contentNode)!=null&&e.id))return(r=this.root.contentNode)==null?void 0:r.id},Gt=new WeakMap;let Ko=Zo;var Zt,Rt;const Ro=class Ro{constructor(e,r){be(this,"opts");be(this,"root");be(this,"attachment");be(this,"onInteractOutside",e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!it(e.target))return;const r=e.target.closest(jo.selector("trigger"));if(!(r&&r===this.root.triggerNode)){if(this.opts.customAnchor.current){if(it(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const p=document.querySelector(this.opts.customAnchor.current);if(p&&p.contains(e.target))return}}this.root.handleClose()}});be(this,"onEscapeKeydown",e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()});$(this,Zt,Se(()=>({open:this.root.opts.open.current})));$(this,Rt,Se(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Is(this.root.opts.open.current),[jo.content]:"",style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment})));be(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown});this.opts=e,this.root=r,this.attachment=Ns(this.opts.ref,p=>this.root.contentNode=p),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new en({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.root.handleDelayedHoverClose()}})}static create(e){return new Ro(e,Qo.get())}onpointerdown(e){this.root.markInteraction()}onfocusin(e){const r=e.target;it(r)&&Xr(r)&&this.root.markInteraction()}onpointerenter(e){mo(e)||this.root.cancelDelayedClose()}onpointerleave(e){mo(e)}get shouldRender(){return this.root.contentPresence.shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}get snippetProps(){return t(h(this,Zt))}set snippetProps(e){n(h(this,Zt),e)}get props(){return t(h(this,Rt))}set props(e){n(h(this,Rt),e)}};Zt=new WeakMap,Rt=new WeakMap;let Xo=Ro;var tn=M("<div><div><!></div></div>"),on=M("<div><div><!></div></div>");function $s(d,e){const r=Fs();yo(e,!0);let p=B(e,"ref",15,null),u=B(e,"id",19,()=>Hs(r)),l=B(e,"forceMount",3,!1),m=B(e,"onOpenAutoFocus",3,St),_=B(e,"onCloseAutoFocus",3,St),q=B(e,"onEscapeKeydown",3,St),se=B(e,"onInteractOutside",3,St),Te=B(e,"trapFocus",3,!0),Z=B(e,"preventScroll",3,!1),A=B(e,"customAnchor",3,null),L=Ls(e,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const K=Xo.create({id:fe(()=>u()),ref:fe(()=>p(),J=>p(J)),onInteractOutside:fe(()=>se()),onEscapeKeydown:fe(()=>q()),customAnchor:fe(()=>A())}),Oe=Se(()=>ho(L,K.props)),R=Se(()=>Te()&&K.shouldTrapFocus);function W(J){K.shouldTrapFocus||J.preventDefault(),m()(J)}var je=oe(),we=N(je);{var le=J=>{Qr(J,Ve(()=>t(Oe),()=>K.popperProps,{get ref(){return K.opts.ref},get enabled(){return K.root.opts.open.current},get id(){return u()},get trapFocus(){return t(R)},get preventScroll(){return Z()},loop:!0,forceMount:!0,get customAnchor(){return A()},onOpenAutoFocus:W,get onCloseAutoFocus(){return _()},get shouldRender(){return K.shouldRender},popper:(Ke,E)=>{let Be=()=>E==null?void 0:E().props,Ce=()=>E==null?void 0:E().wrapperProps;const re=Se(()=>ho(Be(),{style:Ps("popover")},{style:e.style}));var Me=oe(),xe=N(Me);{var qe=X=>{var V=oe(),j=N(V);{let I=Se(()=>({props:t(re),wrapperProps:Ce(),...K.snippetProps}));lt(j,()=>e.child,()=>t(I))}y(X,V)},ee=X=>{var V=tn();Ut(V,()=>({...Ce()}));var j=f(V);Ut(j,()=>({...t(re)}));var I=f(j);lt(I,()=>e.children??vo),c(j),c(V),y(X,V)};he(xe,X=>{e.child?X(qe):X(ee,-1)})}y(Ke,Me)},$$slots:{popper:!0}}))},ve=J=>{Gr(J,Ve(()=>t(Oe),()=>K.popperProps,{get ref(){return K.opts.ref},get open(){return K.root.opts.open.current},get id(){return u()},get trapFocus(){return t(R)},get preventScroll(){return Z()},loop:!0,forceMount:!1,get customAnchor(){return A()},onOpenAutoFocus:W,get onCloseAutoFocus(){return _()},get shouldRender(){return K.shouldRender},popper:(Ke,E)=>{let Be=()=>E==null?void 0:E().props,Ce=()=>E==null?void 0:E().wrapperProps;const re=Se(()=>ho(Be(),{style:Ps("popover")},{style:e.style}));var Me=oe(),xe=N(Me);{var qe=X=>{var V=oe(),j=N(V);{let I=Se(()=>({props:t(re),wrapperProps:Ce(),...K.snippetProps}));lt(j,()=>e.child,()=>t(I))}y(X,V)},ee=X=>{var V=on();Ut(V,()=>({...Ce()}));var j=f(V);Ut(j,()=>({...t(re)}));var I=f(j);lt(I,()=>e.children??vo),c(j),c(V),y(X,V)};he(xe,X=>{e.child?X(qe):X(ee,-1)})}y(Ke,Me)},$$slots:{popper:!0}}))};he(we,J=>{l()?J(le):l()||J(ve,1)})}y(d,je),bo()}var sn=M("<button><!></button>");function Ts(d,e){const r=Fs();yo(e,!0);let p=B(e,"id",19,()=>Hs(r)),u=B(e,"ref",15,null),l=B(e,"type",3,"button"),m=B(e,"disabled",3,!1),_=B(e,"openOnHover",3,!1),q=B(e,"openDelay",3,700),se=B(e,"closeDelay",3,300),Te=Ls(e,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const Z=Ko.create({id:fe(()=>p()),ref:fe(()=>u(),L=>u(L)),disabled:fe(()=>!!m()),openOnHover:fe(()=>_()),openDelay:fe(()=>q()),closeDelay:fe(()=>se())}),A=Se(()=>ho(Te,Z.props,{type:l()}));Zr(d,{get id(){return p()},get ref(){return Z.opts.ref},children:(L,K)=>{var Oe=oe(),R=N(Oe);{var W=we=>{var le=oe(),ve=N(le);lt(ve,()=>e.child,()=>({props:t(A)})),y(we,le)},je=we=>{var le=sn();Ut(le,()=>({...t(A)}));var ve=f(le);lt(ve,()=>e.children??vo),c(le),y(we,le)};he(R,we=>{e.child?we(W):we(je,-1)})}y(L,Oe)},$$slots:{default:!0}}),bo()}function Ss(d,e){yo(e,!0);let r=B(e,"open",15,!1),p=B(e,"onOpenChange",3,St),u=B(e,"onOpenChangeComplete",3,St);Uo.create({open:fe(()=>r(),l=>{r(l),p()(l)}),onOpenChangeComplete:fe(()=>u())}),Rr(d,{children:(l,m)=>{var _=oe(),q=N(_);lt(q,()=>e.children??vo),y(l,_)},$$slots:{default:!0}}),bo()}function rn(d,e){const r=ft(e,["children","$$slots","$$events","$$legacy"]);/**
2
+ * @license lucide-svelte v0.460.1 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const p=[["path",{d:"m3 16 4 4 4-4"}],["path",{d:"M7 20V4"}],["path",{d:"m21 8-4-4-4 4"}],["path",{d:"M17 4v16"}]];pt(d,Ve({name:"arrow-down-up"},()=>r,{get iconNode(){return p},children:(u,l)=>{var m=oe(),_=N(m);ht(_,e,"default",{}),y(u,m)},$$slots:{default:!0}}))}function nn(d,e){const r=ft(e,["children","$$slots","$$events","$$legacy"]);/**
7
+ * @license lucide-svelte v0.460.1 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const p=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];pt(d,Ve({name:"copy"},()=>r,{get iconNode(){return p},children:(u,l)=>{var m=oe(),_=N(m);ht(_,e,"default",{}),y(u,m)},$$slots:{default:!0}}))}function an(d,e){const r=ft(e,["children","$$slots","$$events","$$legacy"]);/**
12
+ * @license lucide-svelte v0.460.1 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const p=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];pt(d,Ve({name:"ellipsis"},()=>r,{get iconNode(){return p},children:(u,l)=>{var m=oe(),_=N(m);ht(_,e,"default",{}),y(u,m)},$$slots:{default:!0}}))}function ln(d,e){const r=ft(e,["children","$$slots","$$events","$$legacy"]);/**
17
+ * @license lucide-svelte v0.460.1 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const p=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];pt(d,Ve({name:"external-link"},()=>r,{get iconNode(){return p},children:(u,l)=>{var m=oe(),_=N(m);ht(_,e,"default",{}),y(u,m)},$$slots:{default:!0}}))}function un(d,e){const r=ft(e,["children","$$slots","$$events","$$legacy"]);/**
22
+ * @license lucide-svelte v0.460.1 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const p=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];pt(d,Ve({name:"pencil"},()=>r,{get iconNode(){return p},children:(u,l)=>{var m=oe(),_=N(m);ht(_,e,"default",{}),y(u,m)},$$slots:{default:!0}}))}function Os(d,e){const r=ft(e,["children","$$slots","$$events","$$legacy"]);/**
27
+ * @license lucide-svelte v0.460.1 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const p=[["path",{d:"M3 6h18"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17"}]];pt(d,Ve({name:"trash-2"},()=>r,{get iconNode(){return p},children:(u,l)=>{var m=oe(),_=N(m);ht(_,e,"default",{}),y(u,m)},$$slots:{default:!0}}))}function cn(d,e){const r=ft(e,["children","$$slots","$$events","$$legacy"]);/**
32
+ * @license lucide-svelte v0.460.1 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const p=[["path",{d:"M3 6h18"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}]];pt(d,Ve({name:"trash"},()=>r,{get iconNode(){return p},children:(u,l)=>{var m=oe(),_=N(m);ht(_,e,"default",{}),y(u,m)},$$slots:{default:!0}}))}function Ms(d){const e=d.trim();if(!e)return e;if(!/^https?:\/\//i.test(e))return e.toLowerCase();try{const r=new URL(e),p=r.protocol.toLowerCase(),u=r.host.toLowerCase();let l=r.pathname;return l.length>1&&l.endsWith("/")&&(l=l.slice(0,-1)),l=l.toLowerCase(),`${p}//${u}${l}${r.search}${r.hash}`}catch{return e.toLowerCase()}}function Ds(d){const e=d.trim();if(!/^https?:\/\//i.test(e))return null;try{return new URL(e).hostname.replace(/^www\./i,"")||null}catch{return null}}function As(d){return`/api/feed-favicon?domain=${encodeURIComponent(d)}`}var dn=M("<option> </option>"),pn=M('<p class="save-error svelte-1beoyzy"> </p>'),hn=M('<span class="confirm-delete-row svelte-1beoyzy"><span class="confirm-delete-text svelte-1beoyzy">确认删除?</span> <button type="button" class="btn-confirm-yes svelte-1beoyzy">删除</button> <button type="button" class="btn-confirm-no svelte-1beoyzy">取消</button></span>'),fn=M('<button type="button" class="btn-delete svelte-1beoyzy"><!> 删除</button>'),vn=M('<div class="modal-header svelte-1beoyzy"><!> <!></div> <div class="modal-body svelte-1beoyzy"><div class="field svelte-1beoyzy"><span class="field-label svelte-1beoyzy">Ref <span class="required svelte-1beoyzy">*</span></span> <div class="ref-input-wrap svelte-1beoyzy"><input class="field-input svelte-1beoyzy" type="text" placeholder="https://example.com/feed"/></div></div> <div class="field svelte-1beoyzy"><span class="field-label svelte-1beoyzy">来源</span> <div class="parse-hints svelte-1beoyzy" role="status" aria-live="polite"><span title="标准 RSS/Atom/JSON Feed(内置 __rss__,rss-parser)"><!> <span>RSS/Atom</span></span> <span title="内置 IMAP 邮件插件(__email__)"><!> <span>邮箱</span></span> <span title="Site 插件(listUrlPattern)或语鲸协议(lingowhale://)"><!> <span>插件</span></span> <span title="通用网页列表:无 Feed 特征且未命中插件时,走 LLM 解析(generic)"><!> <span>LLM</span></span></div></div> <div class="field svelte-1beoyzy"><span class="field-label svelte-1beoyzy">名称</span> <input class="field-input svelte-1beoyzy" type="text" placeholder="显示名称(留空则显示 ref)"/></div> <div class="field svelte-1beoyzy"><span class="field-label svelte-1beoyzy">描述</span> <input class="field-input svelte-1beoyzy" type="text" placeholder="简短说明"/></div> <div class="field-row svelte-1beoyzy"><div class="field svelte-1beoyzy"><span class="field-label svelte-1beoyzy">权重(0–1)</span> <input class="field-input field-input--weight svelte-1beoyzy" type="number" min="0" max="1" step="0.01" inputmode="decimal" placeholder="0–1"/></div> <div class="field svelte-1beoyzy"><span class="field-label svelte-1beoyzy">刷新间隔</span> <select class="field-input svelte-1beoyzy"></select></div></div> <div class="field svelte-1beoyzy"><span class="field-label svelte-1beoyzy">代理</span> <input class="field-input svelte-1beoyzy" type="text" placeholder="http://127.0.0.1:7890"/></div> <!></div> <div class="modal-footer svelte-1beoyzy"><div class="modal-footer-left svelte-1beoyzy"><!></div> <div class="modal-footer-right svelte-1beoyzy"><!> <button type="button" class="btn-save svelte-1beoyzy"> </button></div></div>',1),mn=M("<!> <!>",1),yn=M('<p class="remove-dialog-target svelte-1beoyzy"> </p>'),bn=M('<div class="modal-header svelte-1beoyzy"><!> <!></div> <div class="modal-body svelte-1beoyzy"><p id="remove-source-desc" class="remove-dialog-text svelte-1beoyzy">确定删除该信源吗?操作会同时删除该信源下已入库的所有条目,且不可恢复。</p> <!></div> <div class="modal-footer remove-dialog-footer svelte-1beoyzy"><!> <button type="button" class="btn-confirm-yes svelte-1beoyzy">移除</button></div>',1),_n=M("<!> <!>",1),gn=M('<span class="sort-menu-dir svelte-1beoyzy" aria-hidden="true"> </span>'),wn=M('<button type="button"><span> </span> <!></button>'),Cn=M("<!> <!>",1),kn=M('<div class="state svelte-1beoyzy">加载中…</div>'),zn=M('<div class="state error svelte-1beoyzy"> </div>'),Pn=M('<div class="state svelte-1beoyzy">暂无信源。<button type="button" class="link-btn svelte-1beoyzy">点击添加</button>第一个信源。</div>'),xn=M('<div class="state svelte-1beoyzy">无匹配结果</div>'),$n=M('<img class="source-title-favicon svelte-1beoyzy" alt="" width="16" height="16" loading="lazy" decoding="async"/>'),Tn=M('<span class="source-title-favicon-slot svelte-1beoyzy" aria-hidden="true"><!></span>'),Sn=M('<button type="button" class="more-menu-item svelte-1beoyzy" title="在本机服务端启动与抓取相同的有头 Chrome(共用浏览器数据目录与代理)"><!> <span>打开链接</span></button>'),On=M('<button type="button" title="强制拉取"><!> <span> </span></button> <button type="button" class="more-menu-item svelte-1beoyzy"><!> <span>编辑</span></button> <button type="button" class="more-menu-item svelte-1beoyzy" title="复制本服务的 RSS 订阅地址(/rss?ref=…)"><!> <span>复制 RSS 地址</span></button> <!> <button type="button" class="more-menu-item more-menu-item-danger svelte-1beoyzy" title="清空该信源下所有已入库条目"><!> <span> </span></button> <button type="button" class="more-menu-item more-menu-item-remove svelte-1beoyzy" title="从订阅列表中移除此信源"><!> <span> </span></button>',1),Mn=M("<!> <!>",1),Dn=M('<div class="card row-grid svelte-1beoyzy" role="button" tabindex="0"><div class="cell-title svelte-1beoyzy"><div class="title-block svelte-1beoyzy"><!> <div class="title-line svelte-1beoyzy"><span class="title-text svelte-1beoyzy"> </span> <span class="title-item-count svelte-1beoyzy"> </span></div></div></div> <div class="cell-actions svelte-1beoyzy"><!></div></div>'),An=M('<div class="list svelte-1beoyzy"></div>'),Fn=M('<!> <!> <!> <div class="feed-wrap svelte-1beoyzy"><div class="feed-col svelte-1beoyzy"><div class="feed-toolbar-block svelte-1beoyzy"><div class="feed-header svelte-1beoyzy"><div class="header-left svelte-1beoyzy"><input class="filter-input svelte-1beoyzy" type="search" placeholder="过滤…"/> <!></div> <div class="header-right svelte-1beoyzy"><button type="button" class="btn-add svelte-1beoyzy" title="添加信源" aria-label="添加信源"><!></button></div></div></div> <div class="feed-body-scroll svelte-1beoyzy"><!></div></div></div>',1);function ra(d,e){yo(e,!1);const r=()=>ms(Lr,"$refToTaskId",u),p=()=>ms(Io,"$page",u),[u,l]=Sr(),m=P(),_=P(),q=P(),se=P();function Te(o){return o==="alpha"||o==="parse"?"asc":"desc"}const Z="1day",A=[{value:"10min",label:"10 分钟"},{value:"30min",label:"30 分钟"},{value:"1h",label:"1 小时"},{value:"6h",label:"6 小时"},{value:"12h",label:"12 小时"},{value:"1day",label:"1 天"},{value:"3day",label:"3 天"},{value:"7day",label:"7 天"}];function L(o){const s=(o==null?void 0:o.trim())??"";return A.some(a=>a.value===s)?s:Z}function K(o){return Math.min(1,Math.max(0,o))}function Oe(o){const s=typeof o=="number"&&!Number.isNaN(o)?o:Number(String(o).trim());return Number.isFinite(s)?s<0||s>1?{ok:!1,message:"权重需在 0–1 之间"}:{ok:!0,value:s}:{ok:!1,message:"权重需为 0–1 之间的数字"}}let R=[],W=P([]),je=P(!0),we=P(""),le=P(""),ve=P("weight"),J=P("desc"),Ue=P(!1),Ke="",E=P(null),Be=P({}),Ce=P(null),re=P(null),Me=P(!1),xe=P(null),qe=P(!1),ee=P(null),X=P(!1),V=P(!1),j=P(!1),I=P(""),$e=P(""),vt=P(""),mt=P(""),At=P(0),Ft=P(Z),yt=P(""),bt=P(null),eo=null;function to(o){const s=(o==null?void 0:o.trim())??"";if(!s)return s;const a=s.toLowerCase();return a.startsWith("http://")||a.startsWith("https://")||a.startsWith("imaps://")||a.startsWith("imap://")||a.startsWith("lingowhale://")?s:"https://"+s}function Ks(o){const s=o.toLowerCase();return s.includes("/feed")||s.includes("/rss")||s.includes("/atom")||s.endsWith(".xml")||s.endsWith(".rss")||s.endsWith(".atom")||s.includes("format=rss")||s.includes("format=atom")||s.includes("output=rss")}function es(o,s){const a=(o==null?void 0:o.trim())??"";if(!a)return null;const i=a.toLowerCase();if(i.startsWith("imaps://")||i.startsWith("imap://"))return"email";if(i.startsWith("lingowhale://"))return"plugin";const w=to(a);return!w.startsWith("http://")&&!w.startsWith("https://")?null:Ks(w)?"rss":s?"plugin":"llm"}function _o(o){return o==="rss"?"RSS/Atom":o==="plugin"?"插件":o==="llm"?"LLM":o==="email"?"邮箱":"—"}function Bs(o){eo&&clearTimeout(eo);const s=o==null?void 0:o.trim();if(!s){n(bt,null);return}n(bt,null);const a=to(s);eo=setTimeout(async()=>{eo=null;try{const i=await Ne("/api/sources/plugin-match",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refs:[a]})});if(i.ok){const w=await i.json();to(t($e).trim())===a&&n(bt,w[a]??null)}}catch{to(t($e).trim())===a&&n(bt,null)}},400)}function qs(o,s,a){const i=a==="desc"?-1:1;return[...o].sort((w,k)=>{let b=0;switch(s){case"weight":b=w.weight-k.weight;break;case"alpha":b=w.displayLabel.localeCompare(k.displayLabel,"zh-CN");break;case"parse":b=_o(w.parseHint).localeCompare(_o(k.parseHint),"zh-CN");break;case"latest":{const H=w.latestAt?new Date(w.latestAt).getTime():NaN,me=k.latestAt?new Date(k.latestAt).getTime():NaN,ue=Number.isFinite(H),g=Number.isFinite(me);if(!ue&&!g)b=0;else if(ue)if(g)b=H-me;else return-1;else return 1;break}case"count":b=w.count-k.count;break;case"week":b=w.weekCount-k.weekCount;break}return b!==0?i*b:w.displayLabel.localeCompare(k.displayLabel,"zh-CN")})}function Js(o){t(ve)===o?n(J,t(J)==="asc"?"desc":"asc"):(n(ve,o),n(J,Te(o)))}let go=P(!1);function ts(o){return o==="alpha"?"标题":o==="weight"?"权重":o==="latest"?"最近拉取":o==="parse"?"解析":o==="week"?"近7天":"数量"}function Xs(o){Js(o),n(go,!1)}const Ys=["alpha","weight","latest","parse","count","week"];async function _t(o){const s=(o==null?void 0:o.silent)===!0;s||n(je,!0),n(we,"");try{const[a,i]=await Promise.all([Ne("/api/sources/raw"),Ne("/api/sources/stats")]),w=await a.text(),k=JSON.parse(w||"{}");R=Array.isArray(k.sources)?k.sources:[];const b=i.ok?await i.json():[],H=new Map;for(const g of b){const S=Ms(g.source_url),F=H.get(S),D=g.latest_at??null,Y=typeof g.count_7d=="number"&&Number.isFinite(g.count_7d)?g.count_7d:0;F?H.set(S,{count:F.count+g.count,weekCount:F.weekCount+Y,latestAt:F.latestAt?D?F.latestAt>=D?F.latestAt:D:F.latestAt:D}):H.set(S,{count:g.count,weekCount:Y,latestAt:D})}const me=R.filter(g=>{var S;return(S=g==null?void 0:g.ref)==null?void 0:S.trim()}).map(g=>g.ref.trim());let ue={};if(me.length>0)try{const g=await Ne("/api/sources/plugin-match",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refs:me})});g.ok&&(ue=await g.json())}catch{}n(W,R.filter(g=>{var S;return(S=g==null?void 0:g.ref)==null?void 0:S.trim()}).map(g=>{var ke,ye;const S=g.ref.trim(),F=H.get(Ms(S))??{count:0,weekCount:0,latestAt:null},D=ue[S]??null,Y=(ke=g.proxy)==null?void 0:ke.trim();return{ref:S,displayLabel:g.label&&g.label.trim()||S,description:(ye=g.description)==null?void 0:ye.trim(),count:(F==null?void 0:F.count)??0,weekCount:(F==null?void 0:F.weekCount)??0,latestAt:(F==null?void 0:F.latestAt)??null,pluginId:D,weight:g.weight??0,...Y?{proxy:Y}:{},parseHint:es(S,D)}}))}catch(a){n(we,a instanceof Error?a.message:String(a)),s||n(W,[])}finally{s||n(je,!1)}}async function wo(o){return(await Ne("/api/sources/raw",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({sources:o})})).ok}function os(){n(V,!1),n($e,""),n(vt,""),n(mt,""),n(At,0),n(Ft,Z),n(yt,""),n(I,""),n(X,!0)}function Qs(o){const s=R.find(a=>a.ref===o.ref);n(V,!0),Ke=o.ref,n($e,o.ref),n(vt,(s==null?void 0:s.label)??""),n(mt,(s==null?void 0:s.description)??""),n(At,K((s==null?void 0:s.weight)??0)),n(Ft,L(s==null?void 0:s.refresh)),n(yt,(s==null?void 0:s.proxy)??""),n(I,""),n(Ue,!1),n(X,!0)}function ss(){n(X,!1),n(Ue,!1)}async function Gs(){const o=t($e).trim();if(!o){n(I,"ref 不能为空");return}const s=Oe(t(At));if(!s.ok){n(I,s.message);return}n(j,!0),n(I,"");try{const a=s.value,i={ref:o,...t(vt).trim()?{label:t(vt).trim()}:{},...t(mt).trim()?{description:t(mt).trim()}:{},refresh:t(Ft),...t(yt).trim()?{proxy:t(yt).trim()}:{},...a!==0?{weight:a}:{}};let w;if(t(V)){if(o!==Ke&&R.some(b=>b.ref===o)){n(I,"该 ref 已存在");return}w=R.map(b=>b.ref===Ke?{...b,...i}:b)}else{if(R.some(b=>b.ref===o)){n(I,"该 ref 已存在");return}w=[...R,i]}if(!await wo(w)){n(I,"保存失败,请重试");return}ss(),await _t({silent:!0})}catch(a){n(I,a instanceof Error?a.message:String(a))}finally{n(j,!1)}}async function rs(o){try{const s=await Ne("/api/items/by-source?source_url="+encodeURIComponent(o),{method:"DELETE"}),a=await s.json();return!s.ok||!a.ok?{ok:!1,message:a.message??"删除信源条目失败"}:{ok:!0,deleted:Number(a.deleted??0)}}catch(s){return{ok:!1,message:s instanceof Error?s.message:"删除信源条目失败"}}}async function Zs(){const o=Ke.trim();if(!o){n(I,"缺少信源 ref");return}n(j,!0),n(I,"");try{const s=await rs(o);if(!s.ok){n(I,s.message);return}const a=R.filter(w=>w.ref!==o);if(!await wo(a)){n(I,"删除信源失败,请重试");return}ss(),await _t({silent:!0})}catch(s){n(I,s instanceof Error?s.message:String(s))}finally{n(j,!1)}}async function Rs(o){for(let s=0;s<120;s++){const a=await Ne(`/api/tasks/${o}`);if(!a.ok)return{ok:!1,error:"轮询失败"};const i=await a.json();if(i.status==="done")return{ok:!0};if(i.status==="error")return{ok:!1,error:i.error??"拉取失败"};await new Promise(w=>setTimeout(w,800))}return{ok:!1,error:"超时"}}async function er(o,s){if(s==null||s.preventDefault(),s==null||s.stopPropagation(),!(o in r()))try{const a=await Ne("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"source-pull",ref:o})}),i=await a.json();if(!a.ok||!i.taskId)return;Er(o,i.taskId),(await Rs(i.taskId)).ok&&await _t({silent:!0})}catch{}finally{Wr(o)}}function tr(o){const s=o.trim().toLowerCase();return s.startsWith("http://")||s.startsWith("https://")}function or(o){const s=new URL("/rss",typeof window<"u"?window.location.origin:"http://127.0.0.1");return s.searchParams.set("ref",o),s.href}async function sr(o,s){s==null||s.preventDefault(),s==null||s.stopPropagation();try{const a=await Ne("/api/sources/open-browser",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:o})}),i=await a.json();a.ok&&i.ok?Tt(i.message??"已在爬虫浏览器中打开","success"):Tt(i.message??"打开失败","error")}catch{Tt("打开失败","error")}finally{n(E,null)}}async function rr(o){const s=or(o);try{await navigator.clipboard.writeText(s)}catch{try{const a=document.createElement("textarea");a.value=s,a.style.position="fixed",a.style.left="-9999px",document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a)}catch{}}n(E,null)}function nr(o){n(Me,o),o||n(xe,null)}function ar(o){t(re)||(n(xe,o),n(Me,!0),n(E,null))}async function ir(){var s;const o=t(xe);if(!(!o||t(re))){n(Me,!1),n(xe,null),n(re,o);try{const a=await rs(o);if(!a.ok){Tt(a.message,"error");return}const i=R.filter(k=>k.ref!==o);if(!await wo(i)){Tt("移除失败,请重试","error");return}bs(Io).url.pathname==="/"?_s.update(k=>(k==null?void 0:k.ref)===o?null:k):((s=t(ee))==null?void 0:s.ref)===o&&(n(qe,!1),n(ee,null)),await _t({silent:!0})}catch(a){Tt(a instanceof Error?a.message:"移除失败","error")}finally{n(re,null)}}}async function lr(o){if(!t(Ce)&&confirm("确定要清空该信源下的所有条目吗?此操作不可恢复。")){n(Ce,o),n(E,null);try{const s=await Ne("/api/items/by-source?source_url="+encodeURIComponent(o),{method:"DELETE"}),a=await s.json();s.ok&&a.ok?await _t({silent:!0}):s.ok||alert(a.message??"清空失败")}catch(s){alert(s instanceof Error?s.message:"清空失败")}finally{n(Ce,null)}}}function ns(o){var s,a;if(bs(Io).url.pathname==="/"){_s.set({ref:o.ref,displayLabel:o.displayLabel,...(s=o.description)!=null&&s.trim()?{description:o.description.trim()}:{},...(a=o.proxy)!=null&&a.trim()?{proxy:o.proxy.trim()}:{},...o.parseHint!=null?{parseHint:o.parseHint}:{}});return}n(ee,o),n(qe,!0)}function ur(o,s){const a=s.target;a&&(a.closest("a[href], button")||ns(o))}function cr(o,s){s.key!=="Enter"&&s.key!==" "||(s.preventDefault(),ns(o))}zr(_t),Vt(()=>(t(xe),t(W)),()=>{var o;n(m,t(xe)!=null?((o=t(W).find(s=>s.ref===t(xe)))==null?void 0:o.displayLabel)??t(xe):"")}),Vt(()=>t($e),()=>{t($e),Bs(t($e))}),Vt(()=>(t($e),t(bt)),()=>{n(_,es(t($e),t(bt)))}),Vt(()=>t(_),()=>{n(q,t(_)??"llm")}),Vt(()=>(t(le),t(W),t(ve),t(J)),()=>{n(se,qs(t(le).trim()?t(W).filter(o=>{var a;const s=t(le).trim().toLowerCase();return o.displayLabel.toLowerCase().includes(s)||(((a=o.description)==null?void 0:a.toLowerCase().includes(s))??!1)||o.ref.toLowerCase().includes(s)||_o(o.parseHint).toLowerCase().includes(s)}):t(W),t(ve),t(J)))}),Pr(),Mr();var as=Fn(),is=N(as);gs(is,{get open(){return t(X)},onOpenChange:o=>{n(X,o),o||n(Ue,!1)},children:(o,s)=>{po(o,{children:(a,i)=>{var w=mn(),k=N(w);ws(k,{class:"modal-overlay"});var b=v(k,2);Cs(b,{class:"modal","aria-describedby":void 0,children:(H,me)=>{var ue=vn(),g=N(ue),S=f(g);ks(S,{class:"modal-title",children:(O,ne)=>{pe();var ae=zt();_e(()=>ze(ae,t(V)?"编辑信源":"添加信源")),y(O,ae)},$$slots:{default:!0}});var F=v(S,2);co(F,{class:"modal-close","aria-label":"关闭",children:(O,ne)=>{pe();var ae=zt("✕");y(O,ae)},$$slots:{default:!0}}),c(g);var D=v(g,2),Y=f(D),ke=v(f(Y),2),ye=f(ke);Pt(ye),c(ke),c(Y);var te=v(Y,2),ce=v(f(te),2),Q=f(ce);let U;var G=f(Q);Dr(G,{size:14,class:"parse-hint-icon"}),pe(2),c(Q);var de=v(Q,2);let De;var xo=f(de);Ar(xo,{size:14,class:"parse-hint-icon"}),pe(2),c(de);var Je=v(de,2);let $o;var oo=f(Je);Fr(oo,{size:14,class:"parse-hint-icon"}),pe(2),c(Je);var Ae=v(Je,2);let Nt;var so=f(Ae);Nr(so,{size:14,class:"parse-hint-icon"}),pe(2),c(Ae),c(ce),c(te);var gt=v(te,2),ro=v(f(gt),2);Pt(ro),c(gt);var Xe=v(gt,2),no=v(f(Xe),2);Pt(no),c(Xe);var Ye=v(Xe,2),It=f(Ye),Ht=v(f(It),2);Pt(Ht),c(It);var ao=v(It,2),Lt=v(f(ao),2);Fo(Lt,5,()=>A,ys,(O,ne)=>{var ae=dn(),Mo=f(ae,!0);c(ae);var uo={};_e(()=>{ze(Mo,(t(ne),x(()=>t(ne).label))),uo!==(uo=(t(ne),x(()=>t(ne).value)))&&(ae.value=(ae.__value=(t(ne),x(()=>t(ne).value)))??"")}),y(O,ae)}),c(Lt),c(ao),c(Ye);var Ee=v(Ye,2),Et=v(f(Ee),2);Pt(Et),c(Ee);var io=v(Ee,2);{var To=O=>{var ne=pn(),ae=f(ne,!0);c(ne),_e(()=>ze(ae,t(I))),y(O,ne)};he(io,O=>{t(I)&&O(To)})}c(D);var nt=v(D,2),wt=f(nt),lo=f(wt);{var So=O=>{var ne=oe(),ae=N(ne);{var Mo=kt=>{var We=hn(),Wt=v(f(We),2),wr=v(Wt,2);c(We),_e(()=>Wt.disabled=t(j)),ie("click",Wt,Zs),ie("click",wr,()=>n(Ue,!1)),y(kt,We)},uo=kt=>{var We=fn(),Wt=f(We);Os(Wt,{size:13}),pe(),c(We),_e(()=>We.disabled=t(j)),ie("click",We,()=>n(Ue,!0)),y(kt,We)};he(ae,kt=>{t(Ue)?kt(Mo):kt(uo,-1)})}y(O,ne)};he(lo,O=>{t(V)&&O(So)})}c(wt);var Qe=v(wt,2),at=f(Qe);co(at,{class:"btn-cancel",get disabled(){return t(j)},children:(O,ne)=>{pe();var ae=zt("取消");y(O,ae)},$$slots:{default:!0}});var Ct=v(at,2),Oo=f(Ct,!0);c(Ct),c(Qe),c(nt),_e(()=>{U=xt(Q,1,"parse-hint svelte-1beoyzy",null,U,{active:t(q)==="rss"}),De=xt(de,1,"parse-hint svelte-1beoyzy",null,De,{active:t(q)==="email"}),$o=xt(Je,1,"parse-hint svelte-1beoyzy",null,$o,{active:t(q)==="plugin"}),Nt=xt(Ae,1,"parse-hint svelte-1beoyzy",null,Nt,{active:t(q)==="llm"}),Ct.disabled=t(j),ze(Oo,t(j)?"保存中…":"保存")}),$t(ye,()=>t($e),O=>n($e,O)),$t(ro,()=>t(vt),O=>n(vt,O)),$t(no,()=>t(mt),O=>n(mt,O)),$t(Ht,()=>t(At),O=>n(At,O)),Or(Lt,()=>t(Ft),O=>n(Ft,O)),$t(Et,()=>t(yt),O=>n(yt,O)),ie("click",Ct,Gs),y(H,ue)},$$slots:{default:!0}}),y(a,w)},$$slots:{default:!0}})},$$slots:{default:!0}});var ls=v(is,2);gs(ls,{get open(){return t(Me)},onOpenChange:nr,children:(o,s)=>{po(o,{children:(a,i)=>{var w=_n(),k=N(w);ws(k,{class:"modal-overlay"});var b=v(k,2);Cs(b,{class:"modal","aria-describedby":"remove-source-desc",children:(H,me)=>{var ue=bn(),g=N(ue),S=f(g);ks(S,{class:"modal-title",children:(Q,U)=>{pe();var G=zt("移除信源");y(Q,G)},$$slots:{default:!0}});var F=v(S,2);co(F,{class:"modal-close","aria-label":"关闭",children:(Q,U)=>{pe();var G=zt("✕");y(Q,G)},$$slots:{default:!0}}),c(g);var D=v(g,2),Y=v(f(D),2);{var ke=Q=>{var U=yn(),G=f(U,!0);c(U),_e(()=>ze(G,t(m))),y(Q,U)};he(Y,Q=>{t(m)&&Q(ke)})}c(D);var ye=v(D,2),te=f(ye);{let Q=Fe(()=>!!t(re));co(te,{class:"btn-cancel",get disabled(){return t(Q)},children:(U,G)=>{pe();var de=zt("取消");y(U,de)},$$slots:{default:!0}})}var ce=v(te,2);c(ye),_e(()=>ce.disabled=!!t(re)),ie("click",ce,ir),y(H,ue)},$$slots:{default:!0}}),y(a,w)},$$slots:{default:!0}})},$$slots:{default:!0}});var us=v(ls,2);{var dr=o=>{{let s=Fe(()=>(t(ee),x(()=>{var b;return((b=t(ee))==null?void 0:b.ref)??""}))),a=Fe(()=>(t(ee),x(()=>{var b;return((b=t(ee))==null?void 0:b.displayLabel)??""}))),i=Fe(()=>(t(ee),x(()=>{var b,H;return((H=(b=t(ee))==null?void 0:b.description)==null?void 0:H.trim())??""}))),w=Fe(()=>(t(ee),x(()=>{var b,H;return((H=(b=t(ee))==null?void 0:b.proxy)==null?void 0:H.trim())??""}))),k=Fe(()=>(t(ee),x(()=>{var b;return((b=t(ee))==null?void 0:b.parseHint)??null})));Ir(o,{variant:"overlay",get open(){return t(qe)},get sourceRef(){return t(s)},get sourceLabel(){return t(a)},get sourceDescription(){return t(i)},get sourceProxy(){return t(w)},get sourceParseHint(){return t(k)},onOpenChange:b=>{n(qe,b),b||n(ee,null)}})}};he(us,o=>{p(),x(()=>p().url.pathname!=="/")&&o(dr)})}var cs=v(us,2),ds=f(cs),Co=f(ds),ps=f(Co),ko=f(ps),zo=f(ko);Pt(zo);var pr=v(zo,2);{var hr=o=>{Ss(o,{get open(){return t(go)},onOpenChange:s=>{n(go,s)},children:(s,a)=>{var i=Cn(),w=N(i);{let b=Fe(()=>(t(ve),x(()=>ts(t(ve))))),H=Fe(()=>t(J)==="asc"?" 升序":" 降序");Ts(w,{type:"button",class:"btn-sort",get title(){return`排序:${t(b)??""}${t(H)??""},点此选择依据或同项切换方向`},"aria-label":"排序",children:(me,ue)=>{rn(me,{size:16})},$$slots:{default:!0}})}var k=v(w,2);po(k,{children:(b,H)=>{$s(b,{class:"dropdown-panel sort-menu",sideOffset:6,align:"start",children:(me,ue)=>{var g=oe(),S=N(g);Fo(S,1,()=>Ys,ys,(F,D)=>{var Y=wn();let ke;var ye=f(Y),te=f(ye,!0);c(ye);var ce=v(ye,2);{var Q=U=>{var G=gn(),de=f(G,!0);c(G),_e(()=>ze(de,t(J)==="asc"?"↑":"↓")),y(U,G)};he(ce,U=>{t(ve)===t(D)&&U(Q)})}c(Y),_e(U=>{ke=xt(Y,1,"sort-menu-item svelte-1beoyzy",null,ke,{active:t(ve)===t(D)}),ze(te,U)},[()=>(t(D),x(()=>ts(t(D))))]),ie("click",Y,()=>Xs(t(D))),y(F,Y)}),y(me,g)},$$slots:{default:!0}})},$$slots:{default:!0}}),y(s,i)},$$slots:{default:!0}})};he(pr,o=>{p(),t(W),x(()=>p().url.pathname==="/"&&t(W).length>0)&&o(hr)})}c(ko);var hs=v(ko,2),Po=f(hs),fr=f(Po);Vr(fr,{size:16,"aria-hidden":"true"}),c(Po),c(hs),c(ps),c(Co);var fs=v(Co,2),vr=f(fs);{var mr=o=>{var s=kn();y(o,s)},yr=o=>{var s=zn(),a=f(s,!0);c(s),_e(()=>ze(a,t(we))),y(o,s)},br=o=>{var s=Pn(),a=v(f(s));pe(),c(s),ie("click",a,os),y(o,s)},_r=o=>{var s=xn();y(o,s)},gr=o=>{var s=An();Fo(s,5,()=>t(se),a=>a.ref,(a,i)=>{const w=Fe(()=>(Ao(Ds),t(i),x(()=>Ds(t(i).ref))));var k=Dn(),b=f(k),H=f(b),me=f(H);{var ue=te=>{var ce=Tn(),Q=f(ce);{var U=G=>{var de=$n();_e(De=>No(de,"src",De),[()=>(Ao(As),Ao(t(w)),x(()=>As(t(w))))]),$r("error",de,()=>{n(Be,{...t(Be),[t(i).ref]:!0})}),Tr(de),y(G,de)};he(Q,G=>{t(Be),t(i),x(()=>!t(Be)[t(i).ref])&&G(U)})}c(ce),y(te,ce)};he(me,te=>{t(w)&&te(ue)})}var g=v(me,2),S=f(g),F=f(S,!0);c(S);var D=v(S,2),Y=f(D,!0);c(D),c(g),c(H),c(b);var ke=v(b,2),ye=f(ke);{let te=Fe(()=>(t(E),t(i),x(()=>t(E)===t(i).ref)));Ss(ye,{get open(){return t(te)},onOpenChange:ce=>{n(E,ce?t(i).ref:null)},children:(ce,Q)=>{var U=Mn(),G=N(U);Ts(G,{class:"btn-icon",title:"更多",onclick:De=>De.stopPropagation(),children:(De,xo)=>{an(De,{size:13})},$$slots:{default:!0}});var de=v(G,2);po(de,{children:(De,xo)=>{$s(De,{class:"dropdown-panel more-menu",sideOffset:6,align:"center",onclick:Je=>Je.stopPropagation(),children:(Je,$o)=>{var oo=On(),Ae=N(oo);let Nt;var so=f(Ae);Hr(so,{size:14});var gt=v(so,2),ro=f(gt,!0);c(gt),c(Ae);var Xe=v(Ae,2),no=f(Xe);un(no,{size:14}),pe(2),c(Xe);var Ye=v(Xe,2),It=f(Ye);nn(It,{size:14}),pe(2),c(Ye);var Ht=v(Ye,2);{var ao=Qe=>{var at=Sn(),Ct=f(at);ln(Ct,{size:14}),pe(2),c(at),ie("click",at,Oo=>sr(t(i).ref,Oo)),y(Qe,at)},Lt=Se(()=>(t(i),x(()=>tr(t(i).ref))));he(Ht,Qe=>{t(Lt)&&Qe(ao)})}var Ee=v(Ht,2),Et=f(Ee);cn(Et,{size:14});var io=v(Et,2),To=f(io,!0);c(io),c(Ee);var nt=v(Ee,2),wt=f(nt);Os(wt,{size:14});var lo=v(wt,2),So=f(lo,!0);c(lo),c(nt),_e(()=>{Nt=xt(Ae,1,"more-menu-item svelte-1beoyzy",null,Nt,{pulling:t(i).ref in r()}),Ae.disabled=(t(i),r(),x(()=>t(i).ref in r())),ze(ro,(t(i),r(),x(()=>t(i).ref in r()?"拉取中…":"拉取"))),Ee.disabled=(t(Ce),t(i),x(()=>t(Ce)===t(i).ref)),ze(To,(t(Ce),t(i),x(()=>t(Ce)===t(i).ref?"清空中…":"清空该源条目"))),nt.disabled=(t(re),t(i),x(()=>t(re)===t(i).ref)),ze(So,(t(re),t(i),x(()=>t(re)===t(i).ref?"移除中…":"移除信源")))}),ie("click",Ae,Qe=>{er(t(i).ref,Qe),n(E,null)}),ie("click",Xe,()=>{Qs(t(i)),n(E,null)}),ie("click",Ye,()=>rr(t(i).ref)),ie("click",Ee,()=>lr(t(i).ref)),ie("click",nt,()=>ar(t(i).ref)),y(Je,oo)},$$slots:{default:!0}})},$$slots:{default:!0}}),y(ce,U)},$$slots:{default:!0}})}c(ke),c(k),_e(()=>{No(H,"title",(t(i),x(()=>t(i).ref))),ze(F,(t(i),x(()=>t(i).displayLabel))),No(D,"title",`已收录 ${t(i),x(()=>t(i).count)??""} 条 · 近 7 天内有拉取记录的条目 ${t(i),x(()=>t(i).weekCount)??""} 条`),ze(Y,(t(i),x(()=>t(i).count)))}),ie("click",k,te=>ur(t(i),te)),ie("keydown",k,te=>cr(t(i),te)),y(a,k)}),c(s),y(o,s)};he(vr,o=>{t(je)?o(mr):t(we)?o(yr,1):(t(W),x(()=>t(W).length===0)?o(br,2):(t(se),x(()=>t(se).length===0)?o(_r,3):o(gr,-1)))})}c(fs),c(ds),c(cs),$t(zo,()=>t(le),o=>n(le,o)),ie("click",Po,os),y(d,as),bo(),l()}xr(["click","keydown"]);export{ra as S};
@@ -0,0 +1 @@
1
+ function p(t){return function(...e){var r=e[0];return r.stopPropagation(),t==null?void 0:t.apply(this,e)}}function o(t){return function(...e){var r=e[0];return r.preventDefault(),t==null?void 0:t.apply(this,e)}}export{o as p,p as s};
@@ -0,0 +1 @@
1
+ var C=Object.defineProperty;var w=a=>{throw TypeError(a)};var D=(a,e,s)=>e in a?C(a,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):a[e]=s;var F=(a,e,s)=>D(a,typeof e!="symbol"?e+"":e,s),M=(a,e,s)=>e.has(a)||w("Cannot "+s);var t=(a,e,s)=>(M(a,e,"read from private field"),s?s.call(a):e.get(a)),u=(a,e,s)=>e.has(a)?w("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,s),A=(a,e,s,i)=>(M(a,e,"write to private field"),i?i.call(a,s):e.set(a,s),s);import{F as N,M as g,G as R,n as E,p as x,m as S,h as k,g as B,L as G,t as I,b as L,a as P,E as j,r as q,s as z,c as H,e as T}from"./vtBo8kBV.js";var d,l,c,p,m,v,b;class J{constructor(e,s=!0){F(this,"anchor");u(this,d,new Map);u(this,l,new Map);u(this,c,new Map);u(this,p,new Set);u(this,m,!0);u(this,v,e=>{if(t(this,d).has(e)){var s=t(this,d).get(e),i=t(this,l).get(s);if(i)N(i),t(this,p).delete(s);else{var f=t(this,c).get(s);f&&(t(this,l).set(s,f.effect),t(this,c).delete(s),f.fragment.lastChild.remove(),this.anchor.before(f.fragment),i=f.effect)}for(const[n,h]of t(this,d)){if(t(this,d).delete(n),n===e)break;const r=t(this,c).get(h);r&&(g(r.effect),t(this,c).delete(h))}for(const[n,h]of t(this,l)){if(n===s||t(this,p).has(n))continue;const r=()=>{if(Array.from(t(this,d).values()).includes(n)){var _=document.createDocumentFragment();G(h,_),_.append(E()),t(this,c).set(n,{effect:h,fragment:_})}else g(h);t(this,p).delete(n),t(this,l).delete(n)};t(this,m)||!i?(t(this,p).add(n),R(h,r,!1)):r()}}});u(this,b,e=>{t(this,d).delete(e);const s=Array.from(t(this,d).values());for(const[i,f]of t(this,c))s.includes(i)||(g(f.effect),t(this,c).delete(i))});this.anchor=e,A(this,m,s)}ensure(e,s){var i=S,f=I();if(s&&!t(this,l).has(e)&&!t(this,c).has(e))if(f){var n=document.createDocumentFragment(),h=E();n.append(h),t(this,c).set(e,{effect:x(()=>s(h)),fragment:n})}else t(this,l).set(e,x(()=>s(this.anchor)));if(t(this,d).set(i,e),f){for(const[r,o]of t(this,l))r===e?i.unskip_effect(o):i.skip_effect(o);for(const[r,o]of t(this,c))r===e?i.unskip_effect(o.effect):i.skip_effect(o.effect);i.oncommit(t(this,v)),i.ondiscard(t(this,b))}else k&&(this.anchor=B),t(this,v).call(this,i)}}d=new WeakMap,l=new WeakMap,c=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,b=new WeakMap;function Q(a,e,s=!1){var i;k&&(i=B,P());var f=new J(a),n=s?j:0;function h(r,o){if(k){var _=q(i);if(r!==parseInt(_.substring(1))){var y=z();H(y),f.anchor=y,T(!1),f.ensure(r,o),T(!0);return}}f.ensure(r,o)}L(()=>{var r=!1;e((o,_=0)=>{r=!0,h(_,o)}),r||h(-1,null)},n)}export{J as B,Q as i};
@@ -0,0 +1,36 @@
1
+ import{c as q,a as n,f as h,t as xt}from"./CS53ooo0.js";import{f as C,at as mt,b7 as ie,a4 as at,an as Ge,a5 as L,av as c,ax as i,aw as A,i as e,az as w,au as gt,aA as k,U as tt,ay as kt}from"./vtBo8kBV.js";import{d as _t,a as ye,s as O,e as ot,r as it}from"./B2cyTHdf.js";import{i as D}from"./BkD3yAYe.js";import{e as st,i as $t}from"./CFwxUBGi.js";import{c as Ne}from"./C4uF_YIK.js";import{a as We,s as S,c as rt}from"./DoRPmqLn.js";import{l as be,s as ze,p as T}from"./BAJAS8BI.js";import{a as Xe}from"./CBY2biv-.js";import{s as Oe}from"./CGCMIfh3.js";import{w as pt}from"./ClknbeNl.js";import{I as xe,P as Pt}from"./DsxvjlCC.js";import{a as wt,b as St,c as It,d as Mt,D as Dt}from"./DAdOEnFb.js";import"./BA4Gucnq.js";import{s as ke}from"./ChUctqXA.js";function lt(f,r){const d=be(r,["children","$$slots","$$events","$$legacy"]);/**
2
+ * @license lucide-svelte v0.460.1 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const o=[["path",{d:"M4 11a9 9 0 0 1 9 9"}],["path",{d:"M4 4a16 16 0 0 1 16 16"}],["circle",{cx:"5",cy:"19",r:"1"}]];xe(f,ze({name:"rss"},()=>d,{get iconNode(){return o},children:(z,F)=>{var p=q(),v=C(p);ke(v,r,"default",{}),n(z,p)},$$slots:{default:!0}}))}function ct(f,r){const d=be(r,["children","$$slots","$$events","$$legacy"]);/**
7
+ * @license lucide-svelte v0.460.1 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const o=[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z"}]];xe(f,ze({name:"puzzle"},()=>d,{get iconNode(){return o},children:(z,F)=>{var p=q(),v=C(p);ke(v,r,"default",{}),n(z,p)},$$slots:{default:!0}}))}function Lt(f,r){const d=be(r,["children","$$slots","$$events","$$legacy"]);/**
12
+ * @license lucide-svelte v0.460.1 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const o=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];xe(f,ze({name:"x"},()=>d,{get iconNode(){return o},children:(z,F)=>{var p=q(),v=C(p);ke(v,r,"default",{}),n(z,p)},$$slots:{default:!0}}))}function dt(f){const r=f.trim();if(!r)return"";const d=r.charAt(0);return/[a-z0-9\u4e00-\u9fff]/i.test(d)?d.toUpperCase():""}function yt(f,r){const d=o=>{const z=o==null?void 0:o.trim();if(!z)return"";try{return new URL(z.startsWith("http")?z:`https://${z}`).hostname.replace(/^www\./i,"")||""}catch{return""}};return d(f)||d(r||"")}function Nt(f){if(!f)return"";const r=f.charAt(0);return/[a-z0-9\u4e00-\u9fff]/i.test(r)?r.toUpperCase():""}function Tt(f,r,d,o){const z=yt(f,r),F=Nt(z);if(F)return F;if(d&&d.length>0){const v=dt(d[0].name);if(v)return v}if(o){const v=dt(o);if(v)return v}const p=(r||"").trim();if(p){const v=p.charAt(0);return/[a-z0-9\u4e00-\u9fff]/i.test(v)?v.toUpperCase():"?"}return"?"}function Rt(f){return f?`/api/feed-favicon?domain=${encodeURIComponent(f)}`:""}function Ht(f){let r=2166136261;for(let z=0;z<f.length;z++)r^=f.charCodeAt(z),r=Math.imul(r,16777619);return`hsl(${(r>>>0)%360} 46% 46%)`}function At(f){const r=f.link||"",d=f.sourceRef,{author:o,authors:z,guid:F,title:p}=f,v=yt(r,d),G=Rt(v),he=Tt(r,d,z,o),R=(F||[r,d,p,o,z==null?void 0:z.map(U=>U.name).join("|")].filter(Boolean).join("|")||he).trim(),J=Ht(R||"feed");return{siteHost:v,faviconSrc:G,letter:he,avatarSeed:R,avatarBg:J}}function Ct(f){const r=f==null?void 0:f.trim();if(r)return r}var Ft=h('<img alt="" class="feed-card-favicon svelte-1dgd2z5" width="26" height="26" loading="lazy" decoding="async"/>'),Ut=h('<span class="feed-card-icon-letter svelte-1dgd2z5" aria-hidden="true"> </span>'),jt=h('<a data-sveltekit-preload-data="hover"><!></a>'),Et=h('<img alt="" class="feed-card-favicon svelte-1dgd2z5" width="26" height="26" loading="lazy" decoding="async"/>'),Ot=h('<span class="feed-card-icon-letter svelte-1dgd2z5" aria-hidden="true"> </span>'),Bt=h('<div role="img"><!></div>'),Jt=h('<span class="feed-card-author-sep svelte-1dgd2z5">、</span>'),qt=h('<a class="feed-card-author-link svelte-1dgd2z5"> </a><!>',1),Xt=h('<a class="feed-card-author-link svelte-1dgd2z5"> </a>'),Gt=h('<span class="feed-card-author-plain svelte-1dgd2z5"> </span>'),Wt=h('<span class="feed-card-author-empty svelte-1dgd2z5">未署名</span>'),Yt=h('<time class="feed-card-time svelte-1dgd2z5"> </time>'),Kt=h('<a class="feed-card-title svelte-1dgd2z5" target="_blank" rel="noopener noreferrer"> </a>'),Qt=h('<span class="feed-card-title feed-card-title-text svelte-1dgd2z5"> </span>'),Vt=h('<div class="feed-card-title-row svelte-1dgd2z5"><!></div>'),Zt=h('<a class="feed-card-summary-link svelte-1dgd2z5" target="_blank" rel="noopener noreferrer" title="打开原文"><p class="feed-card-summary svelte-1dgd2z5"> </p></a>'),er=h('<p class="feed-card-summary svelte-1dgd2z5"> </p>'),tr=h('<a class="feed-card-open-original svelte-1dgd2z5" target="_blank" rel="noopener noreferrer">查看原文</a>'),rr=h('<a class="feed-card-media-anchor svelte-1dgd2z5" target="_blank" rel="noopener noreferrer" title="打开原文"><img alt="" class="feed-card-media-img svelte-1dgd2z5" loading="lazy" decoding="async" referrerpolicy="no-referrer"/></a>'),ar=h('<img alt="" class="feed-card-media-img svelte-1dgd2z5" loading="lazy" decoding="async" referrerpolicy="no-referrer"/>'),sr=h('<div class="feed-card-media svelte-1dgd2z5"><!></div>'),nr=h('<button class="ctx-menu-item svelte-1dgd2z5" type="button"> </button>'),or=h('<button class="ctx-menu-item ctx-delete svelte-1dgd2z5" type="button">删除</button>'),ir=h('<div class="ctx-menu-backdrop svelte-1dgd2z5" role="presentation"><div class="ctx-menu svelte-1dgd2z5" role="menu" tabindex="-1"><!> <!></div></div>'),lr=h('<div role="article"><div class="feed-card-aside svelte-1dgd2z5"><!></div> <div class="feed-card-main svelte-1dgd2z5"><div class="feed-card-author-line svelte-1dgd2z5"><span class="feed-card-author svelte-1dgd2z5"><!></span> <!></div> <!> <!> <!></div></div> <!>',1);function vt(f,r){mt(r,!0);let d=T(r,"title",3,""),o=T(r,"link",3,""),z=T(r,"summary",3,void 0),F=T(r,"content",3,void 0),p=T(r,"author",3,void 0),v=T(r,"pubDate",3,void 0),G=T(r,"sourceRef",3,void 0),he=T(r,"sourceHref",3,void 0),R=T(r,"authorHref",3,void 0),J=T(r,"authors",3,void 0),U=T(r,"guid",3,void 0),Y=T(r,"coverImg",3,void 0),te=T(r,"rawItem",3,void 0),K=T(r,"onDelete",3,void 0),Q=ie(at({show:!1,x:0,y:0})),le=ie("idle"),me=ie(!1);function Ye(t){return t.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi,"").replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()}function Be(t){const a=t.match(/!\[[^\]]*\]\(([^)\s]+)(?:\s+['"][^'"]*['"])?\)/);if(a!=null&&a[1])return a[1].trim();const l=t.match(/<img\b[^>]*\bsrc=["']([^"']+)["'][^>]*>/i);if(l!=null&&l[1])return l[1].trim()}function Je(t){return t.replace(/!\[[^\]]*\]\(([^)\s]+)(?:\s+['"][^'"]*['"])?\)/g," ").replace(/<img\b[^>]*>/gi," ")}function Ke(t){if(!t)return"";const a=new Date(t);if(Number.isNaN(a.getTime()))return"";const P=Date.now()-a.getTime(),M=a.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});if(P<0)return M;const u=Math.floor(P/36e5),s=Math.floor(P/864e5);return s>=7?M:s>=1?`${s} day${s===1?"":"s"} ago`:u>=1?`${u} hour${u===1?"":"s"} ago`:"just now"}Ge(()=>{o(),G(),L(me,!1)});const $e=k(()=>At({link:o()||"",sourceRef:G(),author:p(),authors:J(),guid:U(),title:d()})),re=k(()=>e($e).siteHost),Pe=k(()=>e($e).faviconSrc),ae=k(()=>!!(e(Pe)&&!e(me))),Te=k(()=>e($e).letter),Re=k(()=>e($e).avatarBg),He=k(()=>{var t,a;return(((t=F())==null?void 0:t.trim())||((a=z())==null?void 0:a.trim())||"").trim()}),Qe=k(()=>{var t;return((t=Y())==null?void 0:t.trim())||Be(e(He))}),Ae=k(()=>Ct(e(Qe))),x=k(()=>e(He)?Ye(Je(e(He))):""),y=k(()=>{var t;return!!((t=d())!=null&&t.trim())}),$=k(()=>!!(o()&&!e(y)&&e(x)));function N(t){!te()&&!(U()&&K())||(t.preventDefault(),L(le,"idle"),L(Q,{show:!0,x:t.clientX,y:t.clientY},!0))}function j(){L(Q,{...e(Q),show:!1},!0)}async function V(){if(!te())return;const t=JSON.stringify(te(),null,2);try{await navigator.clipboard.writeText(t),L(le,"copied"),window.setTimeout(j,350)}catch{L(le,"error")}}function se(){U()&&K()&&(K()(U()),j())}var Z=lr(),W=C(Z);let ge;var ne=c(W),we=c(ne);{var _e=t=>{var a=jt();let l,P;var M=c(a);{var u=m=>{var _=Ft();w(()=>S(_,"src",e(Pe))),ot("error",_,()=>L(me,!0)),it(_),n(m,_)},s=m=>{var _=Ut(),g=c(_,!0);i(_),w(()=>O(g,e(Te))),n(m,_)};D(M,m=>{e(ae)?m(u):m(s,-1)})}i(a),w(()=>{l=We(a,1,"feed-card-icon svelte-1dgd2z5",null,l,{"feed-card-icon--favicon":e(ae)}),S(a,"href",he()),S(a,"title",G()||e(re)||"筛选该来源"),P=rt(a,"",P,{"background-color":e(ae)?"transparent":e(Re),color:"#fff"})}),n(t,a)},Se=t=>{var a=Bt();let l,P;var M=c(a);{var u=m=>{var _=Et();w(()=>S(_,"src",e(Pe))),ot("error",_,()=>L(me,!0)),it(_),n(m,_)},s=m=>{var _=Ot(),g=c(_,!0);i(_),w(()=>O(g,e(Te))),n(m,_)};D(M,m=>{e(ae)?m(u):m(s,-1)})}i(a),w(()=>{l=We(a,1,"feed-card-icon svelte-1dgd2z5",null,l,{"feed-card-icon--favicon":e(ae)}),S(a,"title",G()||e(re)||"来源"),S(a,"aria-label",G()||e(re)||"来源"),P=rt(a,"",P,{"background-color":e(ae)?"transparent":e(Re),color:"#fff"})}),n(t,a)};D(we,t=>{he()?t(_e):t(Se,-1)})}i(ne);var ce=A(ne,2),de=c(ce),oe=c(de),ve=c(oe);{var Ce=t=>{var a=q(),l=C(a);st(l,17,J,$t,(P,M,u)=>{var s=qt(),m=C(s),_=c(m,!0);i(m);var g=A(m);{var b=E=>{var H=Jt();n(E,H)};D(g,E=>{u<J().length-1&&E(b)})}w(()=>{S(m,"href",e(M).href),O(_,e(M).name)}),n(P,s)}),n(t,a)},qe=t=>{var a=q(),l=C(a);{var P=u=>{var s=Xt(),m=c(s,!0);i(s),w(()=>{S(s,"href",R()),O(m,p())}),n(u,s)},M=u=>{var s=Gt(),m=c(s,!0);i(s),w(()=>O(m,p())),n(u,s)};D(l,u=>{R()?u(P):u(M,-1)})}n(t,a)},X=t=>{var a=Wt();n(t,a)};D(ve,t=>{J()&&J().length>0?t(Ce):p()?t(qe,1):t(X,-1)})}i(oe);var ue=A(oe,2);{var pe=t=>{var a=Yt(),l=c(a,!0);i(a),w(P=>{S(a,"datetime",v()),S(a,"title",v()),O(l,P)},[()=>Ke(v())]),n(t,a)};D(ue,t=>{v()&&t(pe)})}i(de);var ee=A(de,2);{var Ie=t=>{var a=Vt(),l=c(a);{var P=u=>{var s=Kt(),m=c(s,!0);i(s),w(()=>{S(s,"href",o()),O(m,d())}),n(u,s)},M=u=>{var s=Qt(),m=c(s,!0);i(s),w(()=>O(m,d())),n(u,s)};D(l,u=>{o()?u(P):u(M,-1)})}i(a),n(t,a)};D(ee,t=>{e(y)&&t(Ie)})}var fe=A(ee,2);{var Me=t=>{var a=q(),l=C(a);{var P=u=>{var s=Zt(),m=c(s),_=c(m,!0);i(m),i(s),w(()=>{S(s,"href",o()),O(_,e(x))}),n(u,s)},M=u=>{var s=er(),m=c(s,!0);i(s),w(()=>O(m,e(x))),n(u,s)};D(l,u=>{e($)?u(P):u(M,-1)})}n(t,a)},De=t=>{var a=tr();w(()=>S(a,"href",o())),n(t,a)};D(fe,t=>{e(x)?t(Me):o()&&!e(y)&&t(De,1)})}var Fe=A(fe,2);{var Ue=t=>{var a=sr(),l=c(a);{var P=u=>{var s=rr(),m=c(s);i(s),w(()=>{S(s,"href",o()),S(m,"src",e(Ae))}),n(u,s)},M=u=>{var s=ar();w(()=>S(s,"src",e(Ae))),n(u,s)};D(l,u=>{o()?u(P):u(M,-1)})}i(a),n(t,a)};D(Fe,t=>{e(Ae)&&t(Ue)})}i(ce),i(W);var je=A(W,2);{var I=t=>{var a=ir(),l=c(a);let P;var M=c(l);{var u=_=>{var g=nr(),b=c(g,!0);i(g),w(()=>O(b,e(le)==="copied"?"已复制":e(le)==="error"?"复制失败":"复制 JSON")),ye("click",g,V),n(_,g)};D(M,_=>{te()&&_(u)})}var s=A(M,2);{var m=_=>{var g=or();ye("click",g,se),n(_,g)};D(s,_=>{U()&&K()&&_(m)})}i(l),i(a),w(()=>P=rt(l,"",P,{left:`${e(Q).x}px`,top:`${e(Q).y}px`})),ye("click",a,j),ye("click",l,_=>_.stopPropagation()),ye("keydown",l,_=>_.stopPropagation()),n(t,a)};D(je,t=>{e(Q).show&&(te()||U()&&K())&&t(I)})}w(()=>ge=We(W,1,"feed-card svelte-1dgd2z5",null,ge,{"ctx-deletable":!!U()&&!!K()})),ye("contextmenu",W,N),n(f,Z),gt()}_t(["contextmenu","click","keydown"]);function cr(f,r){const d=be(r,["children","$$slots","$$events","$$legacy"]);/**
17
+ * @license lucide-svelte v0.460.1 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const o=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];xe(f,ze({name:"refresh-cw"},()=>d,{get iconNode(){return o},children:(z,F)=>{var p=q(),v=C(p);ke(v,r,"default",{}),n(z,p)},$$slots:{default:!0}}))}function ut(f,r){const d=be(r,["children","$$slots","$$events","$$legacy"]);/**
22
+ * @license lucide-svelte v0.460.1 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const o=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]];xe(f,ze({name:"globe"},()=>d,{get iconNode(){return o},children:(z,F)=>{var p=q(),v=C(p);ke(v,r,"default",{}),n(z,p)},$$slots:{default:!0}}))}function ft(f,r){const d=be(r,["children","$$slots","$$events","$$legacy"]);/**
27
+ * @license lucide-svelte v0.460.1 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const o=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"}]];xe(f,ze({name:"mail"},()=>d,{get iconNode(){return o},children:(z,F)=>{var p=q(),v=C(p);ke(v,r,"default",{}),n(z,p)},$$slots:{default:!0}}))}function ht(f,r){const d=be(r,["children","$$slots","$$events","$$legacy"]);/**
32
+ * @license lucide-svelte v0.460.1 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const o=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}],["path",{d:"M20 3v4"}],["path",{d:"M22 5h-4"}],["path",{d:"M4 17v2"}],["path",{d:"M5 18H3"}]];xe(f,ze({name:"sparkles"},()=>d,{get iconNode(){return o},children:(z,F)=>{var p=q(),v=C(p);ke(v,r,"default",{}),n(z,p)},$$slots:{default:!0}}))}const nt=pt({});function dr(f,r){nt.update(d=>({...d,[f]:r}))}function vr(f){nt.update(r=>{const d={...r};return delete d[f],d})}var ur=h('<span class="source-sheet-meta-icon svelte-ypseth"><!></span>'),fr=h('<span class="source-sheet-proxy svelte-ypseth" aria-label="已配置代理"><!></span>'),hr=h('<div class="source-sheet-state svelte-ypseth">加载中…</div>'),mr=h('<div class="source-sheet-state err svelte-ypseth"> </div>'),gr=h('<div class="source-sheet-state svelte-ypseth">暂无条目</div>'),_r=h('<div class="source-feed-cards svelte-ypseth"></div>'),pr=h('<header class="source-sheet-header svelte-ypseth"><div class="source-sheet-title-wrap svelte-ypseth"><div class="source-sheet-title-row svelte-ypseth"><div class="source-sheet-title-cluster svelte-ypseth"><!> <div class="source-sheet-header-icons svelte-ypseth"><!> <!></div></div></div> <p class="source-sheet-sub source-sheet-sub-desc svelte-ypseth"> </p></div> <!></header> <div class="source-sheet-body svelte-ypseth"><!></div>',1),yr=h("<!> <!>",1),br=h('<span class="source-sheet-meta-icon svelte-ypseth"><!></span>'),zr=h('<span class="source-sheet-proxy svelte-ypseth" aria-label="已配置代理"><!></span>'),xr=h('<div class="source-sheet-state svelte-ypseth">加载中…</div>'),kr=h('<div class="source-sheet-state err svelte-ypseth"> </div>'),$r=h('<div class="source-sheet-state svelte-ypseth">暂无条目</div>'),Pr=h('<div class="source-feed-cards svelte-ypseth"></div>'),wr=h('<header class="source-sheet-header source-sheet-header-inline svelte-ypseth"><div class="source-sheet-title-wrap svelte-ypseth"><div class="source-sheet-title-row svelte-ypseth"><div class="source-sheet-title-cluster svelte-ypseth"><h2 class="source-sheet-title svelte-ypseth"> </h2> <div class="source-sheet-header-icons svelte-ypseth"><!> <!> <button type="button"><!></button></div></div></div> <p class="source-sheet-sub source-sheet-sub-desc svelte-ypseth"> </p></div></header> <div class="source-sheet-body svelte-ypseth"><!></div>',1),Sr=h('<div class="source-sheet-inline-empty svelte-ypseth"><p class="source-sheet-inline-empty-title svelte-ypseth">信源条目</p> <p class="source-sheet-inline-empty-hint svelte-ypseth">在左侧列表中点击某一信源,在此查看已拉取的条目。</p></div>'),Ir=h('<aside class="source-feed-panel-inline svelte-ypseth" aria-label="信源条目列表"><!></aside>');function Jr(f,r){mt(r,!0);let d=T(r,"open",3,!1),o=T(r,"sourceRef",3,""),z=T(r,"sourceLabel",3,""),F=T(r,"sourceDescription",3,""),p=T(r,"sourceProxy",3,""),v=T(r,"sourceParseHint",3,null),G=T(r,"variant",3,"overlay"),he=T(r,"onOpenChange",3,()=>{}),R=ie(at([])),J=ie(!1),U=ie(""),Y=ie(0),te=ie(null),K=ie(at({}));Ge(()=>{const x=nt.subscribe(y=>{L(K,y,!0)});return()=>x()});async function Q(){const x=o().trim();if(!x){L(R,[],!0);return}L(Y,e(Y)+1);const y=e(Y);L(J,!0),L(U,"");try{const $=new URLSearchParams;$.set("ref",x),$.set("limit","100"),$.set("offset","0");const N=await Xe("/api/items?"+$.toString());if(y!==e(Y))return;if(!N.ok)throw new Error(await N.text().catch(()=>`HTTP ${N.status}`));const j=await N.json();L(R,Array.isArray(j.items)?j.items:[],!0)}catch($){if(y!==e(Y))return;L(U,$ instanceof Error?$.message:String($),!0),L(R,[],!0)}finally{y===e(Y)&&L(J,!1)}}Ge(()=>{if(d()&&o()){if(!o().trim()){L(R,[],!0);return}tt(()=>void Q())}else d()||tt(()=>{L(Y,e(Y)+1),L(R,[],!0),L(U,""),L(J,!1)})});function le(x){const y=x.author;if(y!=null&&y.length)return y.join(", ")}function me(x){Ye(x)}async function Ye(x){const y=x.trim();if(!(!y||e(te))){L(te,y,!0);try{const $=await Xe("/api/items/"+encodeURIComponent(y),{method:"DELETE"});if(!$.ok){const N=await $.text().catch(()=>"");throw new Error(N.trim()||`HTTP ${$.status}`)}L(R,e(R).filter(N=>N.id!==y),!0),Oe("已删除该条目","success")}catch($){Oe($ instanceof Error?$.message:String($),"error")}finally{L(te,null)}}}const Be=k(()=>F().trim()?F().trim():"—"),Je=k(()=>[z(),o()].filter(Boolean).join(" · ")||void 0);async function Ke(x){for(let y=0;y<120;y++){const $=await Xe(`/api/tasks/${x}`);if(!$.ok)return{ok:!1,error:"轮询失败"};const N=await $.json();if(N.status==="done")return{ok:!0};if(N.status==="error")return{ok:!1,error:N.error??"拉取失败"};await new Promise(j=>setTimeout(j,800))}return{ok:!1,error:"拉取超时"}}async function $e(x,y){y==null||y.preventDefault(),y==null||y.stopPropagation();const $=x.trim();if(!(!$||$ in e(K)))try{const N=await Xe("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:"source-pull",ref:$})}),j=await N.json();if(!N.ok||!j.taskId){Oe(j.error??"拉取失败","error");return}dr($,j.taskId);const V=await Ke(j.taskId);V.ok?await Q():Oe(V.error??"拉取失败","error")}catch(N){Oe(N instanceof Error?N.message:"拉取失败","error")}finally{vr($)}}const re=k(()=>G()==="inline"&&d()&&o().trim()!==""&&o()in e(K));let Pe=!1;Ge(()=>{const x=e(re);Pe&&!x&&d()&&G()==="inline"&&o().trim()&&tt(()=>void Q()),Pe=x});function ae(x){switch(x){case"rss":return"标准 RSS/Atom/JSON Feed(内置 __rss__)";case"plugin":return"Site 插件(listUrlPattern)或语鲸协议(lingowhale://)";case"llm":return"通用网页列表:LLM 解析(generic)";case"email":return"内置 IMAP 邮件插件(__email__)";default:return""}}function Te(x){switch(x){case"rss":return"解析方式:RSS/Atom";case"plugin":return"解析方式:插件";case"llm":return"解析方式:LLM";case"email":return"解析方式:邮箱";default:return"解析方式"}}var Re=q(),He=C(Re);{var Qe=x=>{var y=q(),$=C(y);Ne($,()=>Dt,(N,j)=>{j(N,{get open(){return d()},onOpenChange:V=>he()(V),children:(V,se)=>{var Z=q(),W=C(Z);Ne(W,()=>Pt,(ge,ne)=>{ne(ge,{children:(we,_e)=>{var Se=yr(),ce=C(Se);Ne(ce,()=>wt,(oe,ve)=>{ve(oe,{class:"source-sheet-overlay"})});var de=A(ce,2);Ne(de,()=>St,(oe,ve)=>{ve(oe,{class:"source-sheet-panel","aria-describedby":void 0,children:(Ce,qe)=>{var X=pr(),ue=C(X),pe=c(ue),ee=c(pe),Ie=c(ee),fe=c(Ie);Ne(fe,()=>It,(g,b)=>{b(g,{class:"source-sheet-title",get title(){return e(Je)},children:(E,H)=>{kt();var Le=xt();w(()=>O(Le,z()||o()||"信源条目")),n(E,Le)},$$slots:{default:!0}})});var Me=A(fe,2),De=c(Me);{var Fe=g=>{var b=ur(),E=c(b);{var H=B=>{lt(B,{size:16,class:"source-sheet-meta-icon-svg"})},Le=B=>{ct(B,{size:16,class:"source-sheet-meta-icon-svg"})},Ve=B=>{ht(B,{size:16,class:"source-sheet-meta-icon-svg"})},Ze=B=>{ft(B,{size:16,class:"source-sheet-meta-icon-svg"})};D(E,B=>{v()==="rss"?B(H):v()==="plugin"?B(Le,1):v()==="llm"?B(Ve,2):v()==="email"&&B(Ze,3)})}i(b),w((B,et)=>{S(b,"title",`解析方式:${B??""}`),S(b,"aria-label",et)},[()=>ae(v()),()=>Te(v())]),n(g,b)};D(De,g=>{v()&&g(Fe)})}var Ue=A(De,2);{var je=g=>{var b=fr(),E=c(b);ut(E,{size:16,class:"source-sheet-proxy-globe","aria-hidden":"true"}),i(b),w(H=>S(b,"title",`代理:${H??""}`),[()=>p().trim()]),n(g,b)},I=k(()=>p().trim());D(Ue,g=>{e(I)&&g(je)})}i(Me),i(Ie),i(ee);var t=A(ee,2),a=c(t,!0);i(t),i(pe);var l=A(pe,2);Ne(l,()=>Mt,(g,b)=>{b(g,{class:"source-sheet-close","aria-label":"关闭",children:(E,H)=>{Lt(E,{size:18})},$$slots:{default:!0}})}),i(ue);var P=A(ue,2),M=c(P);{var u=g=>{var b=hr();n(g,b)},s=g=>{var b=mr(),E=c(b,!0);i(b),w(()=>O(E,e(U))),n(g,b)},m=g=>{var b=gr();n(g,b)},_=g=>{var b=_r();st(b,21,()=>e(R),E=>E.id,(E,H)=>{{let Le=k(()=>{var Ee;return((Ee=e(H).title)==null?void 0:Ee.trim())||""}),Ve=k(()=>e(H).summary??void 0),Ze=k(()=>e(H).content??void 0),B=k(()=>le(e(H))),et=k(()=>e(H).pub_date||e(H).fetched_at),bt=k(()=>o().trim()),zt=k(()=>{var Ee;return(Ee=e(H).image_url)!=null&&Ee.trim()?e(H).image_url:void 0});vt(E,{get title(){return e(Le)},get link(){return e(H).url},get summary(){return e(Ve)},get content(){return e(Ze)},get author(){return e(B)},get pubDate(){return e(et)},get sourceRef(){return e(bt)},get coverImg(){return e(zt)},get guid(){return e(H).id},get rawItem(){return e(H)},onDelete:me})}}),i(b),n(g,b)};D(M,g=>{e(J)&&e(R).length===0?g(u):e(U)?g(s,1):e(R).length===0?g(m,2):g(_,-1)})}i(P),w(()=>{S(t,"title",o()),O(a,e(Be))}),n(Ce,X)},$$slots:{default:!0}})}),n(we,Se)},$$slots:{default:!0}})}),n(V,Z)},$$slots:{default:!0}})}),n(x,y)},Ae=x=>{var y=Ir(),$=c(y);{var N=se=>{var Z=wr(),W=C(Z),ge=c(W),ne=c(ge),we=c(ne),_e=c(we),Se=c(_e,!0);i(_e);var ce=A(_e,2),de=c(ce);{var oe=I=>{var t=br(),a=c(t);{var l=s=>{lt(s,{size:16,class:"source-sheet-meta-icon-svg"})},P=s=>{ct(s,{size:16,class:"source-sheet-meta-icon-svg"})},M=s=>{ht(s,{size:16,class:"source-sheet-meta-icon-svg"})},u=s=>{ft(s,{size:16,class:"source-sheet-meta-icon-svg"})};D(a,s=>{v()==="rss"?s(l):v()==="plugin"?s(P,1):v()==="llm"?s(M,2):v()==="email"&&s(u,3)})}i(t),w((s,m)=>{S(t,"title",`解析方式:${s??""}`),S(t,"aria-label",m)},[()=>ae(v()),()=>Te(v())]),n(I,t)};D(de,I=>{v()&&I(oe)})}var ve=A(de,2);{var Ce=I=>{var t=zr(),a=c(t);ut(a,{size:16,class:"source-sheet-proxy-globe","aria-hidden":"true"}),i(t),w(l=>S(t,"title",`代理:${l??""}`),[()=>p().trim()]),n(I,t)},qe=k(()=>p().trim());D(ve,I=>{e(qe)&&I(Ce)})}var X=A(ve,2);let ue;var pe=c(X);cr(pe,{size:16}),i(X),i(ce),i(we),i(ne);var ee=A(ne,2),Ie=c(ee,!0);i(ee),i(ge),i(W);var fe=A(W,2),Me=c(fe);{var De=I=>{var t=xr();n(I,t)},Fe=I=>{var t=kr(),a=c(t,!0);i(t),w(()=>O(a,e(U))),n(I,t)},Ue=I=>{var t=$r();n(I,t)},je=I=>{var t=Pr();st(t,21,()=>e(R),a=>a.id,(a,l)=>{{let P=k(()=>{var b;return((b=e(l).title)==null?void 0:b.trim())||""}),M=k(()=>e(l).summary??void 0),u=k(()=>e(l).content??void 0),s=k(()=>le(e(l))),m=k(()=>e(l).pub_date||e(l).fetched_at),_=k(()=>o().trim()),g=k(()=>{var b;return(b=e(l).image_url)!=null&&b.trim()?e(l).image_url:void 0});vt(a,{get title(){return e(P)},get link(){return e(l).url},get summary(){return e(M)},get content(){return e(u)},get author(){return e(s)},get pubDate(){return e(m)},get sourceRef(){return e(_)},get coverImg(){return e(g)},get guid(){return e(l).id},get rawItem(){return e(l)},onDelete:me})}}),i(t),n(I,t)};D(Me,I=>{e(J)&&e(R).length===0?I(De):e(U)?I(Fe,1):e(R).length===0?I(Ue,2):I(je,-1)})}i(fe),w(()=>{S(_e,"title",e(Je)),O(Se,z()||o()||"信源条目"),ue=We(X,1,"source-sheet-pull-status svelte-ypseth",null,ue,{pulling:e(re)}),S(X,"title",e(re)?"拉取中…":"立即拉取"),S(X,"aria-label",e(re)?"拉取中":"立即拉取"),S(X,"aria-busy",e(re)),S(ee,"title",o()),O(Ie,e(Be))}),ye("click",X,I=>$e(o(),I)),n(se,Z)},j=k(()=>d()&&o().trim()),V=se=>{var Z=Sr();n(se,Z)};D($,se=>{e(j)?se(N):se(V,-1)})}i(y),n(x,y)};D(He,x=>{G()==="overlay"?x(Qe):x(Ae,-1)})}n(f,Re),gt()}_t(["click"]);const qr=pt(null);export{ft as M,ct as P,lt as R,Jr as S,ht as a,cr as b,vr as c,qr as h,nt as r,dr as s};
@@ -0,0 +1 @@
1
+ import{h as o,a as v,b as y,E as f,r as l,s as m,c as p,e as i,H as T,g}from"./vtBo8kBV.js";import{B as A}from"./BkD3yAYe.js";function b(d,_,e){var s;o&&(s=g,v());var r=new A(d);y(()=>{var a=_()??null;if(o){var h=l(s),c=h===T,u=a!==null;if(c!==u){var t=m();p(t),r.anchor=t,i(!1),r.ensure(a,a&&(n=>e(n,a))),i(!0);return}}r.ensure(a,a&&(n=>e(n,a)))},f)}export{b as c};
@@ -0,0 +1 @@
1
+ import{S as m,m as v,T as _,U as b,V as i,h as y}from"./vtBo8kBV.js";function h(e,l,u=l){var s=new WeakSet;m(e,"input",async r=>{var a=r?e.defaultValue:e.value;if(a=t(e)?o(a):a,u(a),v!==null&&s.add(v),await _(),a!==(a=l())){var d=e.selectionStart,f=e.selectionEnd,n=e.value.length;if(e.value=a??"",f!==null){var c=e.value.length;d===f&&f===n&&c>n?(e.selectionStart=c,e.selectionEnd=c):(e.selectionStart=d,e.selectionEnd=Math.min(f,c))}}}),(y&&e.defaultValue!==e.value||b(l)==null&&e.value)&&(u(t(e)?o(e.value):e.value),v!==null&&s.add(v)),i(()=>{var r=l();if(e===document.activeElement){var a=v;if(s.has(a))return}t(e)&&r===o(e.value)||e.type==="date"&&!r&&!e.value||r!==e.value&&(e.value=r??"")})}function t(e){var l=e.type;return l==="number"||l==="range"}function o(e){return e===""?null:+e}export{h as b};
@@ -0,0 +1 @@
1
+ function i(n,s){return fetch(n,s)}async function w(n,s){const e=await fetch(n,s),r=(await e.text()).trim();if(!e.ok){const t=r.length>100?r.slice(0,100)+"…":r;throw new Error(`请求失败 ${e.status} ${e.statusText}${t?`:${t}`:""}`)}if(!r)throw new Error("API 返回空内容");try{const t=JSON.parse(r);if(t===null&&r==="null")throw new Error("API 返回 null");return t}catch(t){if(t instanceof Error&&t.message==="API 返回 null")throw t;const o=t instanceof SyntaxError?t.message:String(t),a=r.length>80?r.slice(0,80)+"…":r;throw new Error(`API 返回格式异常: ${o}。响应预览: ${a}`)}}export{i as a,w as b};
@@ -0,0 +1 @@
1
+ import{b as ae,h as M,a as ie,i as W,r as le,j as ue,s as Z,c as q,e as B,g as L,C as se,k as oe,l as $,m as ve,n as Y,o as w,p as y,q as de,t as te,u as ce,v as pe,w as J,x as ge,y as he,z as _e,A as j,B as Ee,D as me,F as ne,G as re,I as V,J as Te,K as we,L as Ae,M as Ce,N as Se,O as Ie,P as Ne,Q as fe,R as xe}from"./vtBo8kBV.js";function Oe(e,r){return r}function De(e,r,u){for(var s=[],c=r.length,l,i=r.length,p=0;p<c;p++){let E=r[p];re(E,()=>{if(l){if(l.pending.delete(E),l.done.add(E),l.pending.size===0){var v=e.outrogroups;G(e,J(l.done)),v.delete(l),v.size===0&&(e.outrogroups=null)}}else i-=1},!1)}if(i===0){var a=s.length===0&&u!==null;if(a){var t=u,f=t.parentNode;we(f),f.append(t),e.items.clear()}G(e,r,!a)}else l={pending:new Set(r),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(l)}function G(e,r,u=!0){var s;if(e.pending.size>0){s=new Set;for(const i of e.pending.values())for(const p of i)s.add(e.items.get(p).e)}for(var c=0;c<r.length;c++){var l=r[c];if(s!=null&&s.has(l)){l.f|=w;const i=document.createDocumentFragment();Ae(l,i)}else Ce(r[c],u)}}var ee;function be(e,r,u,s,c,l=null){var i=e,p=new Map,a=(r&fe)!==0;if(a){var t=e;i=M?q(Se(t)):t.appendChild(Y())}M&&ie();var f=null,E=ce(()=>{var d=u();return pe(d)?d:d==null?[]:J(d)}),v,m=new Map,T=!0;function x(d){(C.effect.f&me)===0&&(C.pending.delete(d),C.fallback=f,Re(C,v,i,r,s),f!==null&&(v.length===0?(f.f&w)===0?ne(f):(f.f^=w,b(f,null,i)):re(f,()=>{f=null})))}function n(d){C.pending.delete(d)}var o=ae(()=>{v=W(E);var d=v.length;let h=!1;if(M){var F=le(i)===ue;F!==(d===0)&&(i=Z(),q(i),B(!1),h=!0)}for(var S=new Set,g=ve,R=te(),I=0;I<d;I+=1){M&&L.nodeType===se&&L.data===oe&&(i=L,h=!0,B(!1));var k=v[I],D=s(k,I),_=T?null:p.get(D);_?(_.v&&$(_.v,k),_.i&&$(_.i,I),R&&g.unskip_effect(_.e)):(_=ke(p,T?i:ee??(ee=Y()),k,D,I,c,r,u),T||(_.e.f|=w),p.set(D,_)),S.add(D)}if(d===0&&l&&!f&&(T?f=y(()=>l(i)):(f=y(()=>l(ee??(ee=Y()))),f.f|=w)),d>S.size&&de(),M&&d>0&&q(Z()),!T)if(m.set(g,S),R){for(const[H,z]of p)S.has(H)||g.skip_effect(z.e);g.oncommit(x),g.ondiscard(n)}else x(g);h&&B(!0),W(E)}),C={effect:o,items:p,pending:m,outrogroups:null,fallback:f};T=!1,M&&(i=L)}function O(e){for(;e!==null&&(e.f&Te)===0;)e=e.next;return e}function Re(e,r,u,s,c){var k,D,_,H,z,K,P,Q,U;var l=(s&xe)!==0,i=r.length,p=e.items,a=O(e.effect.first),t,f=null,E,v=[],m=[],T,x,n,o;if(l)for(o=0;o<i;o+=1)T=r[o],x=c(T,o),n=p.get(x).e,(n.f&w)===0&&((D=(k=n.nodes)==null?void 0:k.a)==null||D.measure(),(E??(E=new Set)).add(n));for(o=0;o<i;o+=1){if(T=r[o],x=c(T,o),n=p.get(x).e,e.outrogroups!==null)for(const A of e.outrogroups)A.pending.delete(n),A.done.delete(n);if((n.f&w)!==0)if(n.f^=w,n===a)b(n,null,u);else{var C=f?f.next:a;n===e.effect.last&&(e.effect.last=n.prev),n.prev&&(n.prev.next=n.next),n.next&&(n.next.prev=n.prev),N(e,f,n),N(e,n,C),b(n,C,u),f=n,v=[],m=[],a=O(f.next);continue}if((n.f&V)!==0&&(ne(n),l&&((H=(_=n.nodes)==null?void 0:_.a)==null||H.unfix(),(E??(E=new Set)).delete(n))),n!==a){if(t!==void 0&&t.has(n)){if(v.length<m.length){var d=m[0],h;f=d.prev;var F=v[0],S=v[v.length-1];for(h=0;h<v.length;h+=1)b(v[h],d,u);for(h=0;h<m.length;h+=1)t.delete(m[h]);N(e,F.prev,S.next),N(e,f,F),N(e,S,d),a=d,f=S,o-=1,v=[],m=[]}else t.delete(n),b(n,a,u),N(e,n.prev,n.next),N(e,n,f===null?e.effect.first:f.next),N(e,f,n),f=n;continue}for(v=[],m=[];a!==null&&a!==n;)(t??(t=new Set)).add(a),m.push(a),a=O(a.next);if(a===null)continue}(n.f&w)===0&&v.push(n),f=n,a=O(n.next)}if(e.outrogroups!==null){for(const A of e.outrogroups)A.pending.size===0&&(G(e,J(A.done)),(z=e.outrogroups)==null||z.delete(A));e.outrogroups.size===0&&(e.outrogroups=null)}if(a!==null||t!==void 0){var g=[];if(t!==void 0)for(n of t)(n.f&V)===0&&g.push(n);for(;a!==null;)(a.f&V)===0&&a!==e.fallback&&g.push(a),a=O(a.next);var R=g.length;if(R>0){var I=(s&fe)!==0&&i===0?u:null;if(l){for(o=0;o<R;o+=1)(P=(K=g[o].nodes)==null?void 0:K.a)==null||P.measure();for(o=0;o<R;o+=1)(U=(Q=g[o].nodes)==null?void 0:Q.a)==null||U.fix()}De(e,g,I)}}l&&Ie(()=>{var A,X;if(E!==void 0)for(n of E)(X=(A=n.nodes)==null?void 0:A.a)==null||X.apply()})}function ke(e,r,u,s,c,l,i,p){var a=(i&ge)!==0?(i&he)===0?_e(u,!1,!1):j(u):null,t=(i&Ee)!==0?j(c):null;return{v:a,i:t,e:y(()=>(l(r,a??u,t??c,p),()=>{e.delete(s)}))}}function b(e,r,u){if(e.nodes)for(var s=e.nodes.start,c=e.nodes.end,l=r&&(r.f&w)===0?r.nodes.start:u;s!==null;){var i=Ne(s);if(l.before(s),s===c)return;s=i}}function N(e,r,u){r===null?e.effect.first=u:r.next=u,u===null?e.effect.last=r:u.prev=r}export{be as e,Oe as i};
@@ -0,0 +1 @@
1
+ import{w as a}from"./ClknbeNl.js";let t=null;const s=a({msg:"",type:""});function m(e,o=""){s.set({msg:e,type:o}),t&&clearTimeout(t),t=setTimeout(()=>s.set({msg:"",type:""}),3500)}export{m as s,s as t};
@@ -0,0 +1 @@
1
+ import{aF as w,n as v,N as f,aG as E,Y as T,aH as N,aI as y,h as i,g as n,aJ as M,c as x,aK as C,aL as L,a as h,C as O}from"./vtBo8kBV.js";var m;const c=((m=globalThis==null?void 0:globalThis.window)==null?void 0:m.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function b(e){return(c==null?void 0:c.createHTML(e))??e}function g(e){var r=w("template");return r.innerHTML=b(e.replaceAll("<!>","<!---->")),r.content}function a(e,r){var t=T;t.nodes===null&&(t.nodes={start:e,end:r,a:null,t:null})}function R(e,r){var t=(r&N)!==0,l=(r&y)!==0,s,u=!e.startsWith("<!>");return()=>{if(i)return a(n,null),n;s===void 0&&(s=g(u?e:"<!>"+e),t||(s=f(s)));var o=l||E?document.importNode(s,!0):s.cloneNode(!0);if(t){var _=f(o),d=o.lastChild;a(_,d)}else a(o,o);return o}}function A(e,r,t="svg"){var l=!e.startsWith("<!>"),s=`<${t}>${l?e:"<!>"+e}</${t}>`,u;return()=>{if(i)return a(n,null),n;if(!u){var o=g(s),_=f(o);u=f(_)}var d=u.cloneNode(!0);return a(d,d),d}}function $(e,r){return A(e,r,"svg")}function D(e=""){if(!i){var r=v(e+"");return a(r,r),r}var t=n;return t.nodeType!==M?(t.before(t=v()),x(t)):C(t),a(t,t),t}function H(){if(i)return a(n,null),n;var e=document.createDocumentFragment(),r=document.createComment(""),t=v();return e.append(r,t),a(r,t),e}function F(e,r){if(i){var t=T;((t.f&L)===0||t.nodes.end===null)&&(t.nodes.end=n),h();return}e!==null&&e.before(r)}function S(){var e,r;if(i&&n&&n.nodeType===O&&((e=n.textContent)!=null&&e.startsWith("$"))){const t=n.textContent.substring(1);return h(),t}return(r=window.__svelte??(window.__svelte={})).uid??(r.uid=1),`c${window.__svelte.uid++}`}const I="5";var p;typeof window<"u"&&((p=window.__svelte??(window.__svelte={})).v??(p.v=new Set)).add(I);export{F as a,a as b,H as c,$ as d,R as f,S as p,D as t};
@@ -0,0 +1 @@
1
+ import{h as s,a as l}from"./vtBo8kBV.js";function h(n,a,r,t,d){var i;s&&l();var e=(i=a.$$slots)==null?void 0:i[r],f=!1;e===!0&&(e=a.children,f=!0),e===void 0||e(n,f?()=>t:t)}export{h as s};
@@ -0,0 +1 @@
1
+ import{aj as o,U as a,aE as d}from"./vtBo8kBV.js";function p(s,u,e){if(s==null)return u(void 0),o;const t=a(()=>s.subscribe(u,e));return t.unsubscribe?()=>t.unsubscribe():t}const i=[];function _(s,u=o){let e=null;const t=new Set;function c(r){if(d(s,r)&&(s=r,e)){const b=!i.length;for(const n of t)n[1](),i.push(n,s);if(b){for(let n=0;n<i.length;n+=2)i[n][0](i[n+1]);i.length=0}}}function f(r){c(r(s))}function l(r,b=o){const n=[r,b];return t.add(n),t.size===1&&(e=u(c,f)||o),r(s),()=>{t.delete(n),t.size===0&&e&&(e(),e=null)}}return{set:c,update:f,subscribe:l}}function h(s){let u;return p(s,e=>u=e)(),u}export{h as g,p as s,_ as w};
@@ -0,0 +1,6 @@
1
+ import{c as n,a as i}from"./CS53ooo0.js";import"./BA4Gucnq.js";import{f as m}from"./vtBo8kBV.js";import{s as l}from"./ChUctqXA.js";import{l as c,s as d}from"./BAJAS8BI.js";import{I as f}from"./DsxvjlCC.js";function y(t,o){const r=c(o,["children","$$slots","$$events","$$legacy"]);/**
2
+ * @license lucide-svelte v0.460.1 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const a=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];f(t,d({name:"plus"},()=>r,{get iconNode(){return a},children:(e,$)=>{var s=n(),p=m(s);l(p,o,"default",{}),i(e,s)},$$slots:{default:!0}}))}export{y as P};
@@ -0,0 +1 @@
1
+ import{c as _,a as s,f as g}from"./CS53ooo0.js";import"./BA4Gucnq.js";import{at as d,aC as b,aD as h,f as v,au as $,a5 as k,i as n,z as y,az as B}from"./vtBo8kBV.js";import{s as z,a as j}from"./B6WG2Sd3.js";import{i as x}from"./BkD3yAYe.js";import{s as C}from"./DoRPmqLn.js";import{i as D}from"./DVa8Y-mQ.js";import{p as H}from"./DXDBlEGf.js";var P=g('<a class="back-to-parent admin-toolbar-btn admin-toolbar-btn--secondary svelte-1md38m6" data-sveltekit-preload-data="hover" aria-label="返回上一层">返回</a>');function I(i,p){d(p,!1);const r=()=>j(H,"$page",f),[f,l]=z(),e=y();function m(t){const a=t.split("/").filter(Boolean);return a.length===0?null:a.length===1?a[0]==="admin"?null:a[0]==="plugins"||a[0]==="logs"?"/":null:(a.pop(),"/"+a.join("/"))}b(()=>r(),()=>{k(e,m(r().url.pathname))}),h(),D();var o=_(),c=v(o);{var u=t=>{var a=P();B(()=>C(a,"href",n(e))),s(t,a)};x(c,t=>{n(e)&&t(u)})}s(i,o),$(),l()}export{I as B};
@@ -0,0 +1 @@
1
+ var Ht=Object.defineProperty;var Bt=n=>{throw TypeError(n)};var Jt=(n,t,e)=>t in n?Ht(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var l=(n,t,e)=>Jt(n,typeof t!="symbol"?t+"":t,e),Lt=(n,t,e)=>t.has(n)||Bt("Cannot "+e);var r=(n,t,e)=>(Lt(n,t,"read from private field"),e?e.call(n):t.get(n)),c=(n,t,e)=>t.has(n)?Bt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,e);import{p as pt,c as N,a as f,f as st}from"./CS53ooo0.js";import{b7 as O,i as s,a5 as h,aA as v,at as nt,f as y,au as it,av as ft,aj as at,ax as gt,aw as Mt}from"./vtBo8kBV.js";import{C as Qt,a as Kt,b as u,w as jt,o as Vt,c as Xt,d as vt,S as Yt,E as Zt,e as ut,g as $t,f as mt,s as S,m as D,n as M,F as te,h as ee,D as re,T as oe,i as Tt}from"./DsxvjlCC.js";import{i as x}from"./BkD3yAYe.js";import{d as yt}from"./DoRPmqLn.js";import{p as d,r as bt,s as Ct}from"./BAJAS8BI.js";const se=Xt({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),K=new Qt("Dialog.Root | AlertDialog.Root");var U,W,q,G,H,J,L,Q,V,X,Y;const St=class St{constructor(t,e){l(this,"opts");c(this,U,O(null));c(this,W,O(null));c(this,q,O(null));c(this,G,O(null));c(this,H,O(void 0));c(this,J,O(void 0));c(this,L,O(void 0));c(this,Q,O(void 0));c(this,V,O(null));c(this,X,O(0));l(this,"depth");l(this,"parent");l(this,"contentPresence");l(this,"overlayPresence");l(this,"getBitsAttr",t=>se.getAttr(t,this.opts.variant.current));c(this,Y,v(()=>({"data-state":$t(this.opts.open.current)})));this.opts=t,this.parent=e,this.depth=e?e.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new Kt({ref:u(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new Kt({ref:u(()=>this.overlayNode),open:this.opts.open,enabled:!0}),jt(()=>this.opts.open.current,i=>{this.parent&&(i?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),Vt(()=>{var i;this.opts.open.current&&((i=this.parent)==null||i.decrementNested())})}static create(t){const e=K.getOr(null);return K.set(new St(t,e))}get triggerNode(){return s(r(this,U))}set triggerNode(t){h(r(this,U),t,!0)}get contentNode(){return s(r(this,W))}set contentNode(t){h(r(this,W),t,!0)}get overlayNode(){return s(r(this,q))}set overlayNode(t){h(r(this,q),t,!0)}get descriptionNode(){return s(r(this,G))}set descriptionNode(t){h(r(this,G),t,!0)}get contentId(){return s(r(this,H))}set contentId(t){h(r(this,H),t,!0)}get titleId(){return s(r(this,J))}set titleId(t){h(r(this,J),t,!0)}get triggerId(){return s(r(this,L))}set triggerId(t){h(r(this,L),t,!0)}get descriptionId(){return s(r(this,Q))}set descriptionId(t){h(r(this,Q),t,!0)}get cancelNode(){return s(r(this,V))}set cancelNode(t){h(r(this,V),t,!0)}get nestedOpenCount(){return s(r(this,X))}set nestedOpenCount(t){h(r(this,X),t,!0)}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}incrementNested(){var t;this.nestedOpenCount++,(t=this.parent)==null||t.incrementNested()}decrementNested(){var t;this.nestedOpenCount!==0&&(this.nestedOpenCount--,(t=this.parent)==null||t.decrementNested())}get sharedProps(){return s(r(this,Y))}set sharedProps(t){h(r(this,Y),t)}};U=new WeakMap,W=new WeakMap,q=new WeakMap,G=new WeakMap,H=new WeakMap,J=new WeakMap,L=new WeakMap,Q=new WeakMap,V=new WeakMap,X=new WeakMap,Y=new WeakMap;let Ot=St;var Z;const kt=class kt{constructor(t,e){l(this,"opts");l(this,"root");l(this,"attachment");c(this,Z,v(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment})));this.opts=t,this.root=e,this.attachment=vt(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}static create(t){return new kt(t,K.get())}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Yt||t.key===Zt)&&(t.preventDefault(),this.root.handleClose())}get props(){return s(r(this,Z))}set props(t){h(r(this,Z),t)}};Z=new WeakMap;let Nt=kt;var $;const Ft=class Ft{constructor(t,e){l(this,"opts");l(this,"root");l(this,"attachment");c(this,$,v(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment})));this.opts=t,this.root=e,this.root.titleId=this.opts.id.current,this.attachment=vt(this.opts.ref),jt.pre(()=>this.opts.id.current,i=>{this.root.titleId=i})}static create(t){return new Ft(t,K.get())}get props(){return s(r(this,$))}set props(t){h(r(this,$),t)}};$=new WeakMap;let It=Ft;var tt,et;const Dt=class Dt{constructor(t,e){l(this,"opts");l(this,"root");l(this,"attachment");c(this,tt,v(()=>({open:this.root.opts.open.current})));c(this,et,v(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":ut(this.root.nestedOpenCount>0),"data-nested":ut(this.root.parent!==null),...this.root.sharedProps,...this.attachment})));this.opts=t,this.root=e,this.attachment=vt(this.opts.ref,i=>{this.root.contentNode=i,this.root.contentId=i==null?void 0:i.id})}static create(t){return new Dt(t,K.get())}get snippetProps(){return s(r(this,tt))}set snippetProps(t){h(r(this,tt),t)}get props(){return s(r(this,et))}set props(t){h(r(this,et),t)}get shouldRender(){return this.root.contentPresence.shouldRender}};tt=new WeakMap,et=new WeakMap;let wt=Dt;var rt,ot;const Et=class Et{constructor(t,e){l(this,"opts");l(this,"root");l(this,"attachment");c(this,rt,v(()=>({open:this.root.opts.open.current})));c(this,ot,v(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":ut(this.root.nestedOpenCount>0),"data-nested":ut(this.root.parent!==null),...this.root.sharedProps,...this.attachment})));this.opts=t,this.root=e,this.attachment=vt(this.opts.ref,i=>this.root.overlayNode=i)}static create(t){return new Et(t,K.get())}get snippetProps(){return s(r(this,rt))}set snippetProps(t){h(r(this,rt),t)}get props(){return s(r(this,ot))}set props(t){h(r(this,ot),t)}get shouldRender(){return this.root.overlayPresence.shouldRender}};rt=new WeakMap,ot=new WeakMap;let At=Et;var ne=st("<div><!></div>");function Pe(n,t){const e=pt();nt(t,!0);let i=d(t,"id",19,()=>mt(e)),m=d(t,"ref",15,null),b=d(t,"level",3,2),I=bt(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const g=It.create({id:u(()=>i()),level:u(()=>b()),ref:u(()=>m(),a=>m(a))}),_=v(()=>D(I,g.props));var C=N(),E=y(C);{var k=a=>{var o=N(),p=y(o);S(p,()=>t.child,()=>({props:s(_)})),f(a,o)},P=a=>{var o=ne();yt(o,()=>({...s(_)}));var p=ft(o);S(p,()=>t.children??at),gt(o),f(a,o)};x(E,a=>{t.child?a(k):a(P,-1)})}f(n,C),it()}var ie=st("<div><!></div>");function _e(n,t){const e=pt();nt(t,!0);let i=d(t,"id",19,()=>mt(e)),m=d(t,"forceMount",3,!1),b=d(t,"ref",15,null),I=bt(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const g=At.create({id:u(()=>i()),ref:u(()=>b(),P=>b(P))}),_=v(()=>D(I,g.props));var C=N(),E=y(C);{var k=P=>{var a=N(),o=y(a);{var p=F=>{var w=N(),A=y(w);{let lt=v(()=>({props:D(s(_)),...g.snippetProps}));S(A,()=>t.child,()=>s(lt))}f(F,w)},dt=F=>{var w=ie();yt(w,lt=>({...lt}),[()=>D(s(_))]);var A=ft(w);S(A,()=>t.children??at,()=>g.snippetProps),gt(w),f(F,w)};x(o,F=>{t.child?F(p):F(dt,-1)})}f(P,a)};x(E,P=>{(g.shouldRender||m())&&P(k)})}f(n,C),it()}function Ce(n,t){nt(t,!0);let e=d(t,"open",15,!1),i=d(t,"onOpenChange",3,M),m=d(t,"onOpenChangeComplete",3,M);Ot.create({variant:u(()=>"dialog"),open:u(()=>e(),g=>{e(g),i()(g)}),onOpenChangeComplete:u(()=>m())});var b=N(),I=y(b);S(I,()=>t.children??at),f(n,b),it()}var ae=st("<button><!></button>");function Oe(n,t){const e=pt();nt(t,!0);let i=d(t,"id",19,()=>mt(e)),m=d(t,"ref",15,null),b=d(t,"disabled",3,!1),I=bt(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const g=Nt.create({variant:u(()=>"close"),id:u(()=>i()),ref:u(()=>m(),a=>m(a)),disabled:u(()=>!!b())}),_=v(()=>D(I,g.props));var C=N(),E=y(C);{var k=a=>{var o=N(),p=y(o);S(p,()=>t.child,()=>({props:s(_)})),f(a,o)},P=a=>{var o=ae();yt(o,()=>({...s(_)}));var p=ft(o);S(p,()=>t.children??at),gt(o),f(a,o)};x(E,a=>{t.child?a(k):a(P,-1)})}f(n,C),it()}var de=st("<!> <!>",1),le=st("<!> <div><!></div>",1);function Ne(n,t){const e=pt();nt(t,!0);let i=d(t,"id",19,()=>mt(e)),m=d(t,"ref",15,null),b=d(t,"forceMount",3,!1),I=d(t,"onCloseAutoFocus",3,M),g=d(t,"onOpenAutoFocus",3,M),_=d(t,"onEscapeKeydown",3,M),C=d(t,"onInteractOutside",3,M),E=d(t,"trapFocus",3,!0),k=d(t,"preventScroll",3,!0),P=d(t,"restoreScrollDelay",3,null),a=bt(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const o=wt.create({id:u(()=>i()),ref:u(()=>m(),A=>m(A))}),p=v(()=>D(a,o.props));var dt=N(),F=y(dt);{var w=A=>{te(A,{get ref(){return o.opts.ref},loop:!0,get trapFocus(){return E()},get enabled(){return o.root.opts.open.current},get onOpenAutoFocus(){return g()},get onCloseAutoFocus(){return I()},focusScope:(zt,Pt)=>{let Rt=()=>Pt==null?void 0:Pt().props;ee(zt,Ct(()=>s(p),{get enabled(){return o.root.opts.open.current},get ref(){return o.opts.ref},onEscapeKeydown:ct=>{_()(ct),!ct.defaultPrevented&&o.root.handleClose()},children:(ct,ce)=>{re(ct,Ct(()=>s(p),{get ref(){return o.opts.ref},get enabled(){return o.root.opts.open.current},onInteractOutside:ht=>{C()(ht),!ht.defaultPrevented&&o.root.handleClose()},children:(ht,he)=>{oe(ht,Ct(()=>s(p),{get ref(){return o.opts.ref},get enabled(){return o.root.opts.open.current},children:(Ut,ue)=>{var xt=N(),Wt=y(xt);{var qt=B=>{var T=de(),j=y(T);{var z=R=>{Tt(R,{get preventScroll(){return k()},get restoreScrollDelay(){return P()}})};x(j,R=>{o.root.opts.open.current&&R(z)})}var _t=Mt(j,2);{let R=v(()=>({props:D(s(p),Rt()),...o.snippetProps}));S(_t,()=>t.child,()=>s(R))}f(B,T)},Gt=B=>{var T=le(),j=y(T);Tt(j,{get preventScroll(){return k()}});var z=Mt(j,2);yt(z,R=>({...R}),[()=>D(s(p),Rt())]);var _t=ft(z);S(_t,()=>t.children??at),gt(z),f(B,T)};x(Wt,B=>{t.child?B(qt):B(Gt,-1)})}f(Ut,xt)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};x(F,A=>{(o.shouldRender||b())&&A(w)})}f(n,dt),it()}export{Ce as D,_e as a,Ne as b,Pe as c,Oe as d};
@@ -0,0 +1 @@
1
+ import{h as t,a as i,a0 as c,b as f}from"./vtBo8kBV.js";import{B as y}from"./BkD3yAYe.js";const b=Symbol("NaN");function m(r,e,n){t&&i();var o=new y(r),s=!c();f(()=>{var a=e();a!==a&&(a=b),s&&a!==null&&typeof a=="object"&&(a={}),o.ensure(a,n)})}export{m as k};
@@ -0,0 +1 @@
1
+ import{n as y,b as u,ak as _,al as g,h as t,C as o,P as l,e as i,c as n,g as p,N as m}from"./vtBo8kBV.js";function C(d,r){let a=null,E=t;var s;if(t){a=p;for(var e=m(document.head);e!==null&&(e.nodeType!==o||e.data!==d);)e=l(e);if(e===null)i(!1);else{var f=l(e);e.remove(),n(f)}}t||(s=document.head.appendChild(y()));try{u(()=>r(s),_|g)}finally{E&&(i(!0),n(a))}}export{C as h};
@@ -0,0 +1 @@
1
+ import{W as d,am as m,an as c,U as g,ao as l,ap as b,i as u,aq as v,ad as h}from"./vtBo8kBV.js";function x(n=!1){const s=d,e=s.l.u;if(!e)return;let f=()=>v(s.s);if(n){let a=0,t={};const _=h(()=>{let i=!1;const r=s.s;for(const o in r)r[o]!==t[o]&&(t[o]=r[o],i=!0);return i&&a++,a});f=()=>u(_)}e.b.length&&m(()=>{p(s,f),l(e.b)}),c(()=>{const a=g(()=>e.m.map(b));return()=>{for(const t of a)typeof t=="function"&&t()}}),e.a.length&&c(()=>{p(s,f),l(e.a)})}function p(n,s){if(n.l.s)for(const e of n.l.s)u(e);s()}export{x as i};
@@ -0,0 +1 @@
1
+ import{s as e}from"./Dr67pd7v.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};
@@ -0,0 +1,2 @@
1
+ import{b8 as Y,M as U,p as X,X as G,h as T,v as x,b9 as rr,ba as ir,ah as fr,S as ar,m as P,bb as tr,bc as er,bd as ur,i as sr,be as or,bf as cr,bg as M,e as V,bh as lr,bi as nr,O as vr,bj as dr,bk as br}from"./vtBo8kBV.js";import{i as hr,a as gr,d as _r,c as Ar,n as Sr,b as Tr}from"./B2cyTHdf.js";function Nr(r,f){var i=void 0,a;Y(()=>{i!==(i=f())&&(a&&(U(a),a=null),i&&(a=X(()=>{G(()=>i(r))})))})}function z(r){var f,i,a="";if(typeof r=="string"||typeof r=="number")a+=r;else if(typeof r=="object")if(Array.isArray(r)){var t=r.length;for(f=0;f<t;f++)r[f]&&(i=z(r[f]))&&(a&&(a+=" "),a+=i)}else for(i in r)r[i]&&(a&&(a+=" "),a+=i);return a}function Or(){for(var r,f,i=0,a="",t=arguments.length;i<t;i++)(r=arguments[i])&&(f=z(r))&&(a&&(a+=" "),a+=f);return a}function pr(r){return typeof r=="object"?Or(r):r??""}const B=[...`
2
+ \r\f \v\uFEFF`];function Er(r,f,i){var a=r==null?"":""+r;if(f&&(a=a?a+" "+f:f),i){for(var t of Object.keys(i))if(i[t])a=a?a+" "+t:t;else if(a.length)for(var e=t.length,u=0;(u=a.indexOf(t,u))>=0;){var o=u+e;(u===0||B.includes(a[u-1]))&&(o===a.length||B.includes(a[o]))?a=(u===0?"":a.substring(0,u))+a.substring(o+1):u=o}}return a===""?null:a}function D(r,f=!1){var i=f?" !important;":";",a="";for(var t of Object.keys(r)){var e=r[t];e!=null&&e!==""&&(a+=" "+t+": "+e+i)}return a}function w(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function Ir(r,f){if(f){var i="",a,t;if(Array.isArray(f)?(a=f[0],t=f[1]):a=f,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var e=!1,u=0,o=!1,n=[];a&&n.push(...Object.keys(a).map(w)),t&&n.push(...Object.keys(t).map(w));var v=0,g=-1;const O=r.length;for(var d=0;d<O;d++){var s=r[d];if(o?s==="/"&&r[d-1]==="*"&&(o=!1):e?e===s&&(e=!1):s==="/"&&r[d+1]==="*"?o=!0:s==='"'||s==="'"?e=s:s==="("?u++:s===")"&&u--,!o&&e===!1&&u===0){if(s===":"&&g===-1)g=d;else if(s===";"||d===O-1){if(g!==-1){var N=w(r.substring(v,g).trim());if(!n.includes(N)){s!==";"&&d++;var S=r.substring(v,d).trim();i+=" "+S+";"}}v=d+1,g=-1}}}}return a&&(i+=D(a)),t&&(i+=D(t,!0)),i=i.trim(),i===""?null:i}return r==null?null:String(r)}function Lr(r,f,i,a,t,e){var u=r.__className;if(T||u!==i||u===void 0){var o=Er(i,a,e);(!T||o!==r.getAttribute("class"))&&(o==null?r.removeAttribute("class"):f?r.className=o:r.setAttribute("class",o)),r.__className=i}else if(e&&t!==e)for(var n in e){var v=!!e[n];(t==null||v!==!!t[n])&&r.classList.toggle(n,v)}return e}function j(r,f={},i,a){for(var t in i){var e=i[t];f[t]!==e&&(i[t]==null?r.style.removeProperty(t):r.style.setProperty(t,e,a))}}function kr(r,f,i,a){var t=r.__style;if(T||t!==f){var e=Ir(f,a);(!T||e!==r.getAttribute("style"))&&(e==null?r.removeAttribute("style"):r.style.cssText=e),r.__style=f}else a&&(Array.isArray(a)?(j(r,i==null?void 0:i[0],a[0]),j(r,i==null?void 0:i[1],a[1],"important")):j(r,i,a));return a}function y(r,f,i=!1){if(r.multiple){if(f==null)return;if(!x(f))return rr();for(var a of r.options)a.selected=f.includes(k(a));return}for(a of r.options){var t=k(a);if(ir(t,f)){a.selected=!0;return}}(!i||f!==void 0)&&(r.selectedIndex=-1)}function F(r){var f=new MutationObserver(()=>{y(r,r.__value)});f.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),fr(()=>{f.disconnect()})}function Rr(r,f,i=f){var a=new WeakSet,t=!0;ar(r,"change",e=>{var u=e?"[selected]":":checked",o;if(r.multiple)o=[].map.call(r.querySelectorAll(u),k);else{var n=r.querySelector(u)??r.querySelector("option:not([disabled])");o=n&&k(n)}i(o),P!==null&&a.add(P)}),G(()=>{var e=f();if(r===document.activeElement){var u=P;if(a.has(u))return}if(y(r,e,t),t&&e===void 0){var o=r.querySelector(":checked");o!==null&&(e=k(o),i(e))}r.__value=e,t=!1}),F(r)}function k(r){return"__value"in r?r.__value:r.value}const I=Symbol("class"),L=Symbol("style"),W=Symbol("is custom element"),Z=Symbol("is html"),yr=M?"link":"LINK",Cr=M?"input":"INPUT",Mr=M?"option":"OPTION",Pr=M?"select":"SELECT";function wr(r){if(T){var f=!1,i=()=>{if(!f){if(f=!0,r.hasAttribute("value")){var a=r.value;C(r,"value",null),r.value=a}if(r.hasAttribute("checked")){var t=r.checked;C(r,"checked",null),r.checked=t}}};r.__on_r=i,vr(i),dr()}}function Hr(r,f){var i=q(r);i.checked!==(i.checked=f??void 0)&&(r.checked=f)}function jr(r,f){f?r.hasAttribute("selected")||r.setAttribute("selected",""):r.removeAttribute("selected")}function C(r,f,i,a){var t=q(r);T&&(t[f]=r.getAttribute(f),f==="src"||f==="srcset"||f==="href"&&r.nodeName===yr)||t[f]!==(t[f]=i)&&(f==="loading"&&(r[br]=i),i==null?r.removeAttribute(f):typeof i!="string"&&J(r).includes(f)?r[f]=i:r.setAttribute(f,i))}function Ur(r,f,i,a,t=!1,e=!1){if(T&&t&&r.nodeName===Cr){var u=r,o=u.type==="checkbox"?"defaultChecked":"defaultValue";o in i||wr(u)}var n=q(r),v=n[W],g=!n[Z];let d=T&&v;d&&V(!1);var s=f||{},N=r.nodeName===Mr;for(var S in f)S in i||(i[S]=null);i.class?i.class=pr(i.class):i[I]&&(i.class=null),i[L]&&(i.style??(i.style=null));var O=J(r);for(const c in i){let l=i[c];if(N&&c==="value"&&l==null){r.value=r.__value="",s[c]=l;continue}if(c==="class"){var E=r.namespaceURI==="http://www.w3.org/1999/xhtml";Lr(r,E,l,a,f==null?void 0:f[I],i[I]),s[c]=l,s[I]=i[I];continue}if(c==="style"){kr(r,l,f==null?void 0:f[L],i[L]),s[c]=l,s[L]=i[L];continue}var _=s[c];if(!(l===_&&!(l===void 0&&r.hasAttribute(c)))){s[c]=l;var R=c[0]+c[1];if(R!=="$$")if(R==="on"){const A={},p="$$"+c;let h=c.slice(2);var H=Tr(h);if(hr(h)&&(h=h.slice(0,-7),A.capture=!0),!H&&_){if(l!=null)continue;r.removeEventListener(h,s[p],A),s[p]=null}if(H)gr(h,r,l),_r([h]);else if(l!=null){let Q=function(m){s[c].call(this,m)};s[p]=Ar(h,r,Q,A)}}else if(c==="style")C(r,c,l);else if(c==="autofocus")lr(r,!!l);else if(!v&&(c==="__value"||c==="value"&&l!=null))r.value=r.__value=l;else if(c==="selected"&&N)jr(r,l);else{var b=c;g||(b=Sr(b));var $=b==="defaultValue"||b==="defaultChecked";if(l==null&&!v&&!$)if(n[c]=null,b==="value"||b==="checked"){let A=r;const p=f===void 0;if(b==="value"){let h=A.defaultValue;A.removeAttribute(b),A.defaultValue=h,A.value=A.__value=p?h:null}else{let h=A.defaultChecked;A.removeAttribute(b),A.defaultChecked=h,A.checked=p?h:!1}}else r.removeAttribute(c);else $||O.includes(b)&&(v||typeof l!="string")?(r[b]=l,b in n&&(n[b]=nr)):typeof l!="function"&&C(r,b,l)}}}return d&&V(!0),s}function $r(r,f,i=[],a=[],t=[],e,u=!1,o=!1){tr(t,i,a,n=>{var v=void 0,g={},d=r.nodeName===Pr,s=!1;if(Y(()=>{var S=f(...n.map(sr)),O=Ur(r,v,S,e,u,o);s&&d&&"value"in S&&y(r,S.value);for(let _ of Object.getOwnPropertySymbols(g))S[_]||U(g[_]);for(let _ of Object.getOwnPropertySymbols(S)){var E=S[_];_.description===or&&(!v||E!==v[_])&&(g[_]&&U(g[_]),g[_]=X(()=>Nr(r,()=>E))),O[_]=E}v=O}),d){var N=r;G(()=>{y(N,v.value,!0),F(N)})}s=!0})}function q(r){return r.__attributes??(r.__attributes={[W]:r.nodeName.includes("-"),[Z]:r.namespaceURI===er})}var K=new Map;function J(r){var f=r.getAttribute("is")||r.nodeName,i=K.get(f);if(i)return i;K.set(f,i=[]);for(var a,t=r,e=Element.prototype;e!==t;){a=cr(t);for(var u in a)a[u].set&&i.push(u);t=ur(t)}return i}const Vr="rssany",Br="https://github.com/joohw/rssany";export{Br as G,Vr as P,Lr as a,Hr as b,kr as c,$r as d,Rr as e,Or as f,wr as r,C as s};
@@ -0,0 +1 @@
1
+ var Zt=t=>{throw TypeError(t)};var Ne=(t,e,n)=>e.has(t)||Zt("Cannot "+n);var v=(t,e,n)=>(Ne(t,e,"read from private field"),n?n.call(t):e.get(t)),A=(t,e,n)=>e.has(t)?Zt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{b7 as P,i as T,a5 as I,T as gt,bt as De}from"./vtBo8kBV.js";import{w as Dt}from"./ClknbeNl.js";import{b as qe,H as qt,S as Vt,R as zt}from"./BUApaBEI.js";import{o as te}from"./Dyvi1wBH.js";new URL("sveltekit-internal://");function Ve(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function ze(t){return t.split("%25").map(decodeURI).join("%25")}function Be(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function At({href:t}){return t.split("#")[0]}function Ke(t,e,n,a=!1){const r=new URL(t);Object.defineProperty(r,"searchParams",{value:new Proxy(r.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return(c,...p)=>(n(c),i[o](c,...p));e();const l=Reflect.get(i,o);return typeof l=="function"?l.bind(i):l}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];a&&s.push("hash");for(const i of s)Object.defineProperty(r,i,{get(){return e(),t[i]},enumerable:!0,configurable:!0});return r}function Fe(...t){let e=5381;for(const n of t)if(typeof n=="string"){let a=n.length;for(;a;)e=e*33^n.charCodeAt(--a)}else if(ArrayBuffer.isView(n)){const a=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let r=a.length;for(;r;)e=e*33^a[--r]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}const Ge=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&Y.delete(Bt(t)),Ge(t,e));const Y=new Map;function He(t,e){const n=Bt(t,e),a=document.querySelector(n);if(a!=null&&a.textContent){a.remove();let{body:r,...s}=JSON.parse(a.textContent);const i=a.getAttribute("data-ttl");return i&&Y.set(n,{body:r,init:s,ttl:1e3*Number(i)}),a.getAttribute("data-b64")!==null&&(r=qe(r)),Promise.resolve(new Response(r,s))}return window.fetch(t,e)}function Me(t,e,n){if(Y.size>0){const a=Bt(t,n),r=Y.get(a);if(r){if(performance.now()<r.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(r.body,r.init);Y.delete(a)}}return window.fetch(e,n)}function Bt(t,e){let a=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const r=[];e.headers&&r.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&r.push(e.body),a+=`[data-hash="${Fe(...r)}"]`}return a}const We=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Ye(t){const e=[];return{pattern:t==="/"?/^\/$/:new RegExp(`^${Xe(t).map(a=>{const r=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(a);if(r)return e.push({name:r[1],matcher:r[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(a);if(s)return e.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!a)return;const i=a.split(/\[(.+?)\](?!\])/);return"/"+i.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return Pt(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return Pt(String.fromCharCode(...l.slice(2).split("-").map(f=>parseInt(f,16))));const p=We.exec(l),[,h,_,g,d]=p;return e.push({name:g,matcher:d,optional:!!h,rest:!!_,chained:_?c===1&&i[0]==="":!1}),_?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return Pt(l)}).join("")}).join("")}/?$`),params:e}}function Je(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function Xe(t){return t.slice(1).split("/").filter(Je)}function Qe(t,e,n){const a={},r=t.slice(1),s=r.filter(o=>o!==void 0);let i=0;for(let o=0;o<e.length;o+=1){const l=e[o];let c=r[o-i];if(l.chained&&l.rest&&i&&(c=r.slice(o-i,o+1).filter(p=>p).join("/"),i=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){a[l.name]=c;const p=e[o+1],h=r[o+1];p&&!p.rest&&p.optional&&h&&l.chained&&(i=0),!p&&!h&&Object.keys(a).length===s.length&&(i=0);continue}if(l.optional&&l.chained){i++;continue}return}if(!i)return a}function Pt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Ze({nodes:t,server_loads:e,dictionary:n,matchers:a}){const r=new Set(e);return Object.entries(n).map(([o,[l,c,p]])=>{const{pattern:h,params:_}=Ye(o),g={id:o,exec:d=>{const f=h.exec(d);if(f)return Qe(f,_,a)},errors:[1,...p||[]].map(d=>t[d]),layouts:[0,...c||[]].map(i),leaf:s(l)};return g.errors.length=g.layouts.length=Math.max(g.errors.length,g.layouts.length),g});function s(o){const l=o<0;return l&&(o=~o),[l,t[o]]}function i(o){return o===void 0?o:[r.has(o),t[o]]}}function ge(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function ee(t,e,n=JSON.stringify){const a=n(e);try{sessionStorage[t]=a}catch{}}var fe;const U=((fe=globalThis.__sveltekit_dhz4pi)==null?void 0:fe.base)??"";var ue;const tn=((ue=globalThis.__sveltekit_dhz4pi)==null?void 0:ue.assets)??U??"",en="1780571209371",me="sveltekit:snapshot",_e="sveltekit:scroll",we="sveltekit:states",nn="sveltekit:pageurl",K="sveltekit:history",X="sveltekit:navigation",D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Et=location.origin;function Kt(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function V(){return{x:pageXOffset,y:pageYOffset}}function B(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const ne={...D,"":D.hover};function ve(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function ye(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=ve(t)}}function Ot(t,e,n){let a;try{if(a=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&a.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";a.hash=`#${o}${a.hash}`}}catch{}const r=t instanceof SVGAElement?t.target.baseVal:t.target,s=!a||!!r||St(a,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(a==null?void 0:a.origin)===Et&&t.hasAttribute("download");return{url:a,external:s,target:r,download:i}}function mt(t){let e=null,n=null,a=null,r=null,s=null,i=null,o=t;for(;o&&o!==document.documentElement;)a===null&&(a=B(o,"preload-code")),r===null&&(r=B(o,"preload-data")),e===null&&(e=B(o,"keepfocus")),n===null&&(n=B(o,"noscroll")),s===null&&(s=B(o,"reload")),i===null&&(i=B(o,"replacestate")),o=ve(o);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:ne[a??"off"],preload_data:ne[r??"off"],keepfocus:l(e),noscroll:l(n),reload:l(s),replace_state:l(i)}}function re(t){const e=Dt(t);let n=!0;function a(){n=!0,e.update(i=>i)}function r(i){n=!1,e.set(i)}function s(i){let o;return e.subscribe(l=>{(o===void 0||n&&l!==o)&&i(o=l)})}return{notify:a,set:r,subscribe:s}}const be={v:()=>{}};function rn(){const{set:t,subscribe:e}=Dt(!1);let n;async function a(){clearTimeout(n);try{const r=await fetch(`${tn}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const i=(await r.json()).version!==en;return i&&(t(!0),be.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:e,check:a}}function St(t,e,n){return t.origin!==Et||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function Cn(t){}const ke=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...ke];const an=new Set([...ke]);[...an];function on(t){return t.filter(e=>e!=null)}function Ft(t){return t instanceof qt||t instanceof Vt?t.status:500}function sn(t){return t instanceof Vt?t.text:"Internal Error"}let S,Q,Tt;const ln=te.toString().includes("$$")||/function \w+\(\) \{\}/.test(te.toString()),ae="a:";var rt,at,ot,it,st,lt,ct,ft,de,ut,he,dt,pe;ln?(S={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(ae)},Q={current:null},Tt={current:!1}):(S=new(de=class{constructor(){A(this,rt,P({}));A(this,at,P(null));A(this,ot,P(null));A(this,it,P({}));A(this,st,P({id:null}));A(this,lt,P({}));A(this,ct,P(-1));A(this,ft,P(new URL(ae)))}get data(){return T(v(this,rt))}set data(e){I(v(this,rt),e)}get form(){return T(v(this,at))}set form(e){I(v(this,at),e)}get error(){return T(v(this,ot))}set error(e){I(v(this,ot),e)}get params(){return T(v(this,it))}set params(e){I(v(this,it),e)}get route(){return T(v(this,st))}set route(e){I(v(this,st),e)}get state(){return T(v(this,lt))}set state(e){I(v(this,lt),e)}get status(){return T(v(this,ct))}set status(e){I(v(this,ct),e)}get url(){return T(v(this,ft))}set url(e){I(v(this,ft),e)}},rt=new WeakMap,at=new WeakMap,ot=new WeakMap,it=new WeakMap,st=new WeakMap,lt=new WeakMap,ct=new WeakMap,ft=new WeakMap,de),Q=new(he=class{constructor(){A(this,ut,P(null))}get current(){return T(v(this,ut))}set current(e){I(v(this,ut),e)}},ut=new WeakMap,he),Tt=new(pe=class{constructor(){A(this,dt,P(!1))}get current(){return T(v(this,dt))}set current(e){I(v(this,dt),e)}},dt=new WeakMap,pe),be.v=()=>Tt.current=!0);function cn(t){Object.assign(S,t)}const oe={spanContext(){return fn},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},fn={traceId:"",spanId:"",traceFlags:0},un=new Set(["icon","shortcut icon","apple-touch-icon"]);let M=null;const j=ge(_e)??{},Z=ge(me)??{},$={url:re({}),page:re({}),navigating:Dt(null),updated:rn()};function Gt(t){j[t]=V()}function dn(t,e){let n=t+1;for(;j[n];)delete j[n],n+=1;for(n=e+1;Z[n];)delete Z[n],n+=1}function tt(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(()=>{})}async function Re(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(U||"/");t&&await t.update()}}function ie(){}let Ht,Ct,_t,O,$t,k;const wt=[],vt=[];let b=null;function jt(){var t;(t=b==null?void 0:b.fork)==null||t.then(e=>e==null?void 0:e.discard()),b=null}const pt=new Map,Ee=new Set,hn=new Set,J=new Set;let w={branch:[],error:null,url:null},Se=!1,yt=!1,se=!0,et=!1,W=!1,xe=!1,Mt=!1,Le,R,L,q;const bt=new Set,le=new Map;async function Dn(t,e,n){var s,i,o,l,c;(s=globalThis.__sveltekit_dhz4pi)!=null&&s.data&&globalThis.__sveltekit_dhz4pi.data,document.URL!==location.href&&(location.href=location.href),k=t,await((o=(i=t.hooks).init)==null?void 0:o.call(i)),Ht=Ze(t),O=document.documentElement,$t=e,Ct=t.nodes[0],_t=t.nodes[1],Ct(),_t(),R=(l=history.state)==null?void 0:l[K],L=(c=history.state)==null?void 0:c[X],R||(R=L=Date.now(),history.replaceState({...history.state,[K]:R,[X]:L},""));const a=j[R];function r(){a&&(history.scrollRestoration="manual",scrollTo(a.x,a.y))}n?(r(),await Sn($t,n)):(await F({type:"enter",url:Kt(k.hash?Un(new URL(location.href)):location.href),replace_state:!0}),r()),En()}function pn(){wt.length=0,Mt=!1}function Ue(t){vt.some(e=>e==null?void 0:e.snapshot)&&(Z[t]=vt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Ae(t){var e;(e=Z[t])==null||e.forEach((n,a)=>{var r,s;(s=(r=vt[a])==null?void 0:r.snapshot)==null||s.restore(n)})}function ce(){Gt(R),ee(_e,j),Ue(L),ee(me,Z)}async function Pe(t,e,n,a){let r;e.invalidateAll&&jt(),await F({type:"goto",url:Kt(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:a,accept:()=>{e.invalidateAll&&(Mt=!0,r=[...le.keys()]),e.invalidate&&e.invalidate.forEach(Rn)}}),e.invalidateAll&&gt().then(gt).then(()=>{le.forEach(({resource:s},i)=>{var o;r!=null&&r.includes(i)&&((o=s.refresh)==null||o.call(s))})})}async function gn(t){if(t.id!==(b==null?void 0:b.id)){jt();const e={};bt.add(e),b={id:t.id,token:e,promise:Oe({...t,preload:e}).then(n=>(bt.delete(e),n.type==="loaded"&&n.state.error&&jt(),n)),fork:null}}return b.promise}async function It(t){var n;const e=(n=await xt(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].filter(Boolean).map(a=>a[1]()))}async function Te(t,e,n){var s;const a={params:w.params,route:{id:((s=w.route)==null?void 0:s.id)??null},url:new URL(location.href)};w={...t.state,nav:a};const r=document.querySelector("style[data-sveltekit]");if(r&&r.remove(),Object.assign(S,t.props.page),Le=new k.root({target:e,props:{...t.props,stores:$,components:vt},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),Ae(L),n){const i={from:null,to:{...a,scroll:j[R]??V()},willUnload:!1,type:"enter",complete:Promise.resolve()};J.forEach(o=>o(i))}yt=!0}async function kt({url:t,params:e,branch:n,errors:a,status:r,error:s,route:i,form:o}){let l="never";if(U&&(t.pathname===U||t.pathname===U+"/"))l="always";else for(const d of n)(d==null?void 0:d.slash)!==void 0&&(l=d.slash);t.pathname=Ve(t.pathname,l),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:s,route:i},props:{constructors:on(n).map(d=>d.node.component),page:Qt(S)}};o!==void 0&&(c.props.form=o);let p={},h=!S,_=0;for(let d=0;d<Math.max(n.length,w.branch.length);d+=1){const f=n[d],u=w.branch[d];(f==null?void 0:f.data)!==(u==null?void 0:u.data)&&(h=!0),f&&(p={...p,...f.data},h&&(c.props[`data_${_}`]=p),_+=1)}return(!w.url||t.href!==w.url.href||w.error!==s||o!==void 0&&o!==S.form||h)&&(c.props.page={error:s,params:e,route:{id:(i==null?void 0:i.id)??null},state:{},status:r,url:new URL(t),form:o??null,data:h?p:S.data}),c}async function Wt({loader:t,parent:e,url:n,params:a,route:r,server_data_node:s}){var p,h,_;let i=null,o=!0;const l={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},c=await t();if((p=c.universal)!=null&&p.load){let g=function(...f){for(const u of f){const{href:m}=new URL(u,n);l.dependencies.add(m)}};const d={tracing:{enabled:!1,root:oe,current:oe},route:new Proxy(r,{get:(f,u)=>(o&&(l.route=!0),f[u])}),params:new Proxy(a,{get:(f,u)=>(o&&l.params.add(u),f[u])}),data:(s==null?void 0:s.data)??null,url:Ke(n,()=>{o&&(l.url=!0)},f=>{o&&l.search_params.add(f)},k.hash),async fetch(f,u){f instanceof Request&&(u={body:f.method==="GET"||f.method==="HEAD"?void 0:await f.blob(),cache:f.cache,credentials:f.credentials,headers:[...f.headers].length>0?f==null?void 0:f.headers:void 0,integrity:f.integrity,keepalive:f.keepalive,method:f.method,mode:f.mode,redirect:f.redirect,referrer:f.referrer,referrerPolicy:f.referrerPolicy,signal:f.signal,...u});const{resolved:m,promise:y}=Ie(f,u,n);return o&&g(m.href),y},setHeaders:()=>{},depends:g,parent(){return o&&(l.parent=!0),e()},untrack(f){o=!1;try{return f()}finally{o=!0}}};i=await c.universal.load.call(null,d)??null}return{node:c,loader:t,server:s,universal:(h=c.universal)!=null&&h.load?{type:"data",data:i,uses:l}:null,data:i??(s==null?void 0:s.data)??null,slash:((_=c.universal)==null?void 0:_.trailingSlash)??(s==null?void 0:s.slash)}}function Ie(t,e,n){let a=t instanceof Request?t.url:t;const r=new URL(a,n);r.origin===n.origin&&(a=r.href.slice(n.origin.length));const s=yt?Me(a,r.href,e):He(a,e);return{resolved:r,promise:s}}function mn(t,e,n,a,r,s){if(Mt)return!0;if(!r)return!1;if(r.parent&&t||r.route&&e||r.url&&n)return!0;for(const i of r.search_params)if(a.has(i))return!0;for(const i of r.params)if(s[i]!==w.params[i])return!0;for(const i of r.dependencies)if(wt.some(o=>o(new URL(i))))return!0;return!1}function Yt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function _n(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const a of n){const r=t.searchParams.getAll(a),s=e.searchParams.getAll(a);r.every(i=>s.includes(i))&&s.every(i=>r.includes(i))&&n.delete(a)}return n}function wn({error:t,url:e,route:n,params:a}){return{type:"loaded",state:{error:t,url:e,route:n,params:a,branch:[]},props:{page:Qt(S),constructors:[]}}}async function Oe({id:t,invalidating:e,url:n,params:a,route:r,preload:s}){if((b==null?void 0:b.id)===t)return bt.delete(b.token),b.promise;const{errors:i,layouts:o,leaf:l}=r,c=[...o,l];i.forEach(u=>u==null?void 0:u().catch(()=>{})),c.forEach(u=>u==null?void 0:u[1]().catch(()=>{}));const p=w.url?t!==Rt(w.url):!1,h=w.route?r.id!==w.route.id:!1,_=_n(w.url,n);let g=!1;const d=c.map(async(u,m)=>{var C;if(!u)return;const y=w.branch[m];return u[1]===(y==null?void 0:y.loader)&&!mn(g,h,p,_,(C=y.universal)==null?void 0:C.uses,a)?y:(g=!0,Wt({loader:u[1],url:n,params:a,route:r,parent:async()=>{var ht;const N={};for(let z=0;z<m;z+=1)Object.assign(N,(ht=await d[z])==null?void 0:ht.data);return N},server_data_node:Yt(u[0]?{type:"skip"}:null,u[0]?y==null?void 0:y.server:void 0)}))});for(const u of d)u.catch(()=>{});const f=[];for(let u=0;u<c.length;u+=1)if(c[u])try{f.push(await d[u])}catch(m){if(m instanceof zt)return{type:"redirect",location:m.location};if(bt.has(s))return wn({error:await nt(m,{params:a,url:n,route:{id:r.id}}),url:n,params:a,route:r});let y=Ft(m),x;if(m instanceof qt)x=m.body;else{if(await $.updated.check())return await Re(),await tt(n);x=await nt(m,{params:a,url:n,route:{id:r.id}})}const C=await vn(u,f,i);return C?kt({url:n,params:a,branch:f.slice(0,C.idx).concat(C.node),errors:i,status:y,error:x,route:r}):await $e(n,{id:r.id},x,y)}else f.push(void 0);return kt({url:n,params:a,branch:f,errors:i,status:200,error:null,route:r,form:e?void 0:null})}async function vn(t,e,n){for(;t--;)if(n[t]){let a=t;for(;!e[a];)a-=1;try{return{idx:a+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Jt({status:t,error:e,url:n,route:a}){const r={};let s=null;try{const i=await Wt({loader:Ct,url:n,params:r,route:a,parent:()=>Promise.resolve({}),server_data_node:Yt(s)}),o={node:await _t(),loader:_t,universal:null,server:null,data:null};return kt({url:n,params:r,branch:[i,o],status:t,error:e,errors:[],route:null})}catch(i){if(i instanceof zt)return Pe(new URL(i.location,location.href),{},0);throw i}}async function yn(t){const e=t.href;if(pt.has(e))return pt.get(e);let n;try{const a=(async()=>{let r=await k.hooks.reroute({url:new URL(t),fetch:async(s,i)=>Ie(s,i,t).promise})??t;if(typeof r=="string"){const s=new URL(t);k.hash?s.hash=r:s.pathname=r,r=s}return r})();pt.set(e,a),n=await a}catch{pt.delete(e);return}return n}async function xt(t,e){if(t&&!St(t,U,k.hash)){const n=await yn(t);if(!n)return;const a=bn(n);for(const r of Ht){const s=r.exec(a);if(s)return{id:Rt(t),invalidating:e,route:r,params:Be(s),url:t}}}}function bn(t){return ze(k.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(U.length))||"/"}function Rt(t){return(k.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function Ce({url:t,type:e,intent:n,delta:a,event:r,scroll:s}){let i=!1;const o=Xt(w,n,t,e,s??null);a!==void 0&&(o.navigation.delta=a),r!==void 0&&(o.navigation.event=r);const l={...o.navigation,cancel:()=>{i=!0,o.reject(new Error("navigation cancelled"))}};return et||Ee.forEach(c=>c(l)),i?null:o}async function F({type:t,url:e,popped:n,keepfocus:a,noscroll:r,replace_state:s,state:i={},redirect_count:o=0,nav_token:l={},accept:c=ie,block:p=ie,event:h}){var z;const _=q;q=l;const g=await xt(e,!1),d=t==="enter"?Xt(w,g,e,t):Ce({url:e,type:t,delta:n==null?void 0:n.delta,intent:g,scroll:n==null?void 0:n.scroll,event:h});if(!d){p(),q===l&&(q=_);return}const f=R,u=L;c(),et=!0,yt&&d.navigation.type!=="enter"&&$.navigating.set(Q.current=d.navigation);let m=g&&await Oe(g);if(!m){if(St(e,U,k.hash))return await tt(e,s);m=await $e(e,{id:null},await nt(new Vt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,s)}if(e=(g==null?void 0:g.url)||e,q!==l)return d.reject(new Error("navigation aborted")),!1;if(m.type==="redirect"){if(o<20){await F({type:t,url:new URL(m.location,e),popped:n,keepfocus:a,noscroll:r,replace_state:s,state:i,redirect_count:o+1,nav_token:l}),d.fulfil(void 0);return}m=await Jt({status:500,error:await nt(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else m.props.page.status>=400&&await $.updated.check()&&(await Re(),await tt(e,s));if(pn(),Gt(f),Ue(u),m.props.page.url.pathname!==e.pathname&&(e.pathname=m.props.page.url.pathname),i=n?n.state:i,!n){const E=s?0:1,G={[K]:R+=E,[X]:L+=E,[we]:i};(s?history.replaceState:history.pushState).call(history,G,"",e),s||dn(R,L)}const y=g&&(b==null?void 0:b.id)===g.id?b.fork:null;b=null,m.props.page.state=i;let x;if(yt){const E=(await Promise.all(Array.from(hn,H=>H(d.navigation)))).filter(H=>typeof H=="function");if(E.length>0){let H=function(){E.forEach(Ut=>{J.delete(Ut)})};E.push(H),E.forEach(Ut=>{J.add(Ut)})}const G=d.navigation.to;w={...m.state,nav:{params:G.params,route:G.route,url:G.url}},m.props.page&&(m.props.page.url=e);const Lt=y&&await y;Lt?x=Lt.commit():(M=null,Le.$set(m.props),M&&Object.assign(m.props.page,M),cn(m.props.page),x=(z=De)==null?void 0:z()),xe=!0}else await Te(m,$t,!1);const{activeElement:C}=document;await x,await gt(),await gt();let N=null;if(se){const E=n?n.scroll:r?V():null;E?scrollTo(E.x,E.y):(N=e.hash&&document.getElementById(je(e)))?N.scrollIntoView():scrollTo(0,0)}const ht=document.activeElement!==C&&document.activeElement!==document.body;!a&&!ht&&Ln(e,!N),se=!0,m.props.page&&(M&&Object.assign(m.props.page,M),Object.assign(S,m.props.page)),et=!1,t==="popstate"&&Ae(L),d.fulfil(void 0),d.navigation.to&&(d.navigation.to.scroll=V()),J.forEach(E=>E(d.navigation)),$.navigating.set(Q.current=null)}async function $e(t,e,n,a,r){return t.origin===Et&&t.pathname===location.pathname&&!Se?await Jt({status:a,error:n,url:t,route:e}):await tt(t,r)}function kn(){let t,e={element:void 0,href:void 0},n;O.addEventListener("mousemove",o=>{const l=o.target;clearTimeout(t),t=setTimeout(()=>{s(l,D.hover)},20)});function a(o){o.defaultPrevented||s(o.composedPath()[0],D.tap)}O.addEventListener("mousedown",a),O.addEventListener("touchstart",a,{passive:!0});const r=new IntersectionObserver(o=>{for(const l of o)l.isIntersecting&&(It(new URL(l.target.href)),r.unobserve(l.target))},{threshold:0});async function s(o,l){const c=ye(o,O),p=c===e.element&&(c==null?void 0:c.href)===e.href&&l>=n;if(!c||p)return;const{url:h,external:_,download:g}=Ot(c,U,k.hash);if(_||g)return;const d=mt(c),f=h&&Rt(w.url)===Rt(h);if(!(d.reload||f))if(l<=d.preload_data){e={element:c,href:c.href},n=D.tap;const u=await xt(h,!1);if(!u)return;gn(u)}else l<=d.preload_code&&(e={element:c,href:c.href},n=l,It(h))}function i(){r.disconnect();for(const o of O.querySelectorAll("a")){const{url:l,external:c,download:p}=Ot(o,U,k.hash);if(c||p)continue;const h=mt(o);h.reload||(h.preload_code===D.viewport&&r.observe(o),h.preload_code===D.eager&&It(l))}}J.add(i),i()}function nt(t,e){if(t instanceof qt)return t.body;const n=Ft(t),a=sn(t);return k.hooks.handleError({error:t,event:e,status:n,message:a})??{message:a}}function qn(t,e={}){return t=new URL(Kt(t)),t.origin!==Et?Promise.reject(new Error("goto: invalid URL")):Pe(t,e,0)}function Rn(t){if(typeof t=="function")wt.push(t);else{const{href:e}=new URL(t,location.href);wt.push(n=>n.href===e)}}function En(){var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let a=!1;if(ce(),!et){const r=Xt(w,void 0,null,"leave"),s={...r.navigation,cancel:()=>{a=!0,r.reject(new Error("navigation cancelled"))}};Ee.forEach(i=>i(s))}a?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ce()}),(e=navigator.connection)!=null&&e.saveData||kn(),O.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const a=ye(n.composedPath()[0],O);if(!a)return;const{url:r,external:s,target:i,download:o}=Ot(a,U,k.hash);if(!r)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const l=mt(a);if(!(a instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol==="https:"||r.protocol==="http:")||o)return;const[p,h]=(k.hash?r.hash.replace(/^#/,""):r.href).split("#"),_=p===At(location);if(s||l.reload&&(!_||!h)){Ce({url:r,type:"link",event:n})?et=!0:n.preventDefault();return}if(h!==void 0&&_){const[,g]=w.url.href.split("#");if(g===h){if(n.preventDefault(),h===""||h==="top"&&a.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const d=a.ownerDocument.getElementById(decodeURIComponent(h));d&&(d.scrollIntoView(),d.focus())}return}if(W=!0,Gt(R),t(r),!l.replace_state)return;W=!1}n.preventDefault(),await new Promise(g=>{requestAnimationFrame(()=>{setTimeout(g,0)}),setTimeout(g,100)}),await F({type:"link",url:r,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??r.href===location.href,event:n})}),O.addEventListener("submit",n=>{if(n.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(n.target),r=n.submitter;if(((r==null?void 0:r.formTarget)||a.target)==="_blank"||((r==null?void 0:r.formMethod)||a.method)!=="get")return;const o=new URL((r==null?void 0:r.hasAttribute("formaction"))&&(r==null?void 0:r.formAction)||a.action);if(St(o,U,!1))return;const l=n.target,c=mt(l);if(c.reload)return;n.preventDefault(),n.stopPropagation();const p=new FormData(l,r);o.search=new URLSearchParams(p).toString(),F({type:"form",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:n})}),addEventListener("popstate",async n=>{var a;if(!Nt){if((a=n.state)!=null&&a[K]){const r=n.state[K];if(q={},r===R)return;const s=j[r],i=n.state[we]??{},o=new URL(n.state[nn]??location.href),l=n.state[X],c=w.url?At(location)===At(w.url):!1;if(l===L&&(xe||c)){i!==S.state&&(S.state=i),t(o),j[R]=V(),s&&scrollTo(s.x,s.y),R=r;return}const h=r-R;await F({type:"popstate",url:o,popped:{state:i,scroll:s,delta:h},accept:()=>{R=r,L=l},block:()=>{history.go(-h)},nav_token:q,event:n})}else if(!W){const r=new URL(location.href);t(r),k.hash&&location.reload()}}}),addEventListener("hashchange",()=>{W&&(W=!1,history.replaceState({...history.state,[K]:++R,[X]:L},"",location.href))});for(const n of document.querySelectorAll("link"))un.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(Q.current=null)});function t(n){w.url=S.url=n,$.page.set(Qt(S)),$.page.notify()}}async function Sn(t,{status:e=200,error:n,node_ids:a,params:r,route:s,server_route:i,data:o,form:l}){Se=!0;const c=new URL(location.href);let p;({params:r={},route:s={id:null}}=await xt(c,!1)||{}),p=Ht.find(({id:g})=>g===s.id);let h,_=!0;try{const g=a.map(async(f,u)=>{const m=o[u];return m!=null&&m.uses&&(m.uses=xn(m.uses)),Wt({loader:k.nodes[f],url:c,params:r,route:s,parent:async()=>{const y={};for(let x=0;x<u;x+=1)Object.assign(y,(await g[x]).data);return y},server_data_node:Yt(m)})}),d=await Promise.all(g);if(p){const f=p.layouts;for(let u=0;u<f.length;u++)f[u]||d.splice(u,0,void 0)}h=await kt({url:c,params:r,branch:d,status:e,error:n,errors:p==null?void 0:p.errors,form:l,route:p??null})}catch(g){if(g instanceof zt){await tt(new URL(g.location,location.href));return}h=await Jt({status:Ft(g),error:await nt(g,{url:c,params:r,route:s}),url:c,route:s}),t.textContent="",_=!1}h.props.page&&(h.props.page.state={}),await Te(h,t,_)}function xn(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let Nt=!1;function Ln(t,e=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const a=je(t);if(a&&document.getElementById(a)){const{x:s,y:i}=V();setTimeout(()=>{const o=history.state;Nt=!0,location.replace(new URL(`#${a}`,location.href)),history.replaceState(o,"",t),e&&scrollTo(s,i),Nt=!1})}else{const s=document.body,i=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),i!==null?s.setAttribute("tabindex",i):s.removeAttribute("tabindex")}const r=getSelection();if(r&&r.type!=="None"){const s=[];for(let i=0;i<r.rangeCount;i+=1)s.push(r.getRangeAt(i));setTimeout(()=>{if(r.rangeCount===s.length){for(let i=0;i<r.rangeCount;i+=1){const o=s[i],l=r.getRangeAt(i);if(o.commonAncestorContainer!==l.commonAncestorContainer||o.startContainer!==l.startContainer||o.endContainer!==l.endContainer||o.startOffset!==l.startOffset||o.endOffset!==l.endOffset)return}r.removeAllRanges()}})}}}function Xt(t,e,n,a,r=null){var c,p;let s,i;const o=new Promise((h,_)=>{s=h,i=_});return o.catch(()=>{}),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url,scroll:V()},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((p=e==null?void 0:e.route)==null?void 0:p.id)??null},url:n,scroll:r},willUnload:!e,type:a,complete:o},fulfil:s,reject:i}}function Qt(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function Un(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function je(t){let e;if(k.hash){const[,,n]=t.hash.split("#",3);e=n??""}else e=t.hash.slice(1);return decodeURIComponent(e)}export{Dn as a,qn as g,Cn as l,S as p,$ as s};