import{t as e}from"./parse-date-BdYTmLpo.mjs";import{t}from"./got-BBDj7u1e.mjs";import{Fragment as n,jsx as r,jsxs as i}from"hono/jsx/jsx-runtime";import{renderToString as a}from"hono/jsx/dom/server";import{raw as o}from"hono/html";const s={global:`要闻`,"a-stock":`A股`,"us-stock":`美股`,"hk-stock":`港股`,forex:`外汇`,commodity:`商品`,financing:`理财`},c={path:`/live/:category?/:score?`,categories:[`finance`],example:`/wallstreetcn/live`,parameters:{category:"快讯分类，默认`global`，见下表",score:"快讯重要度，默认`1`全部快讯，可设置为`2`只看重要的"},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`wallstreetcn.com/live/:category`,`wallstreetcn.com/`],target:`/live/:category?`}],name:`实时快讯`,maintainers:[`nczitzk`],handler:l,description:`| 要闻   | A 股    | 美股     | 港股     | 外汇  | 商品      | 理财      |
| ------ | ------- | -------- | -------- | ----- | --------- | --------- |
| global | a-stock | us-stock | hk-stock | forex | commodity | financing |`};async function l(c){let l=c.req.param(`category`)??`global`,u=c.req.param(`score`)??1,d=`https://wallstreetcn.com/live/${l}`,f=(await t({method:`get`,url:`https://api-one.wallstcn.com/apiv1/content/lives?channel=${l}-channel&limit=${c.req.query(`limit`)??100}`})).data.data.items.filter(e=>e.score>=u).map(t=>({link:t.uri,title:t.title||t.content_text,pubDate:e(t.display_time*1e3),author:t.author?.display_name??``,description:a(i(n,{children:[t.content?o(t.content):null,t.content_more?o(t.content_more):null,t.images?.length?t.images.map(e=>r(`img`,{src:e.uri,width:e.width,height:e.height})):null]}))}));return{title:`华尔街见闻 - 实时快讯 - ${s[l]}`,link:d,item:f}}export{c as route};