PageSourceSearch

https://buicha.social/vite/D0jbhijO.js

js buicha.social collected 2026-09-25 21:56:06 UTC 2,473 bytes, 1 lines download raw bytes

1import{b as I,a as i,c as g,w,z as R,g as x,h as r,j as n,s as o,i as H,l as u,C as y,T as P,q as l,M as q,N as L,B as N,H as X}from"./Co3cvlEU.js";import{at as V,as as W}from"./app-B3k0Lwm3.js";import{u as j}from"./B3jtKiHl.js";import{M as A}from"./BMQgyq9x.js";import{M as D}from"./CywbjsOS.js";import{s as $}from"./BgiUUhZ3.js";import"./BTqQ_sdn.js";const F={key:1},U=["href","title"],b="rssTicker",te=I({__name:"WidgetRssTicker",props:{widget:{}},emits:["updateProps"],setup(M,{expose:_,emit:z}){const C={url:{type:"string",default:"http://feeds.afpbb.com/rss/afpbb/afpbbnews"},shuffle:{type:"boolean",default:!0},refreshIntervalSec:{type:"number",default:60},maxEntries:{type:"number",default:15},duration:{type:"range",default:70,step:1,min:5,max:200},reverse:{type:"boolean",default:!1},showHeader:{type:"boolean",default:!1},transparent:{type:"boolean",default:!1}},d=M,B=z,{widgetProps:t,configure:c}=j(b,C,d,B),f=i([]),S=g(()=>{const e=f.value.slice(0,t.maxEntries);return t.shuffle&&$(e),e}),m=i(!0),v=g(()=>{const e=new URL("/api/fetch-rss",V);return e.searchParams.set("url",t.url),e}),p=i(),k=i(0),h=()=>{window.document.visibilityState==="hidden"&&f.value.length!==0||window.fetch(v.value,{}).then(e=>e.json()).then(e=>{f.value=e.items,m.value=!1,k.value++})};return w(()=>v,h),w(()=>t.refreshIntervalSec,()=>{p.value&&p.value(),p.value=W(h,Math.max(1e4,t.refreshIntervalSec*1e3),{immediate:!0,afterMounted:!0})},{immediate:!0}),_({name:b,configure:c,id:d.widget?d.widget.id:null}),(e,s)=>{const T=R("MkEllipsis");return r(),x(D,{naked:l(t).transparent,showHeader:l(t).showHeader,class:"mkw-rss-ticker"},{icon:n(()=>s[1]||(s[1]=[o("i",{class:"ti ti-rss"},null,-1)])),header:n(()=>s[2]||(s[2]=[X("RSS")])),func:n(({buttonStyleClass:a})=>[o("button",{class:H(["_button",a]),onClick:s[0]||(s[0]=(...E)=>l(c)&&l(c)(...E))},s[3]||(s[3]=[o("i",{class:"ti ti-settings"},null,-1)]),2)]),default:n(()=>[o("div",{class:"xqXRz"},[m.value?(r(),u("div",{key:0,class:"xcA1y"},[y(T)],2)):(r(),u("div",F,[y(P,{name:"xsfLM",mode:"default",appear:""},{default:n(()=>[(r(),x(A,{key:k.value,duration:l(t).duration,reverse:l(t).reverse},{default:n(()=>[(r(!0),u(q,null,L(S.value,a=>(r(),u("span",{key:a.link,class:"xzB1l"},[o("a",{href:a.link,rel:"nofollow noopener",target:"_blank",title:a.title},N(a.title),9,U),o("span",{class:"xtXzk"},null,2)],2))),128))]),_:1},8,["duration","reverse"]))]),_:1},8,["name"])]))],2)]),_:1},8,["naked","showHeader"])}}});export{te as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.