PageSourceSearch

https://traeai.com/_next/static/chunks/9160-8cad6ac528a3b072.js

js traeai.com collected 2026-10-02 00:34:21 UTC 14,703 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9160],{11951:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(12588).A)("award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]])},15737:(e,t,a)=>{a.d(t,{$:()=>s,U:()=>l});let r="traeai-read-articles",i=null;function n(){if(i)return i;try{let e=localStorage.getItem(r);i=e?new Set(JSON.parse(e)):new Set}catch{i=new Set}return i}function s(e){return n().has(e)}function l(e){let t=n();if(!t.has(e)){t.add(e);try{let e=[...t].slice(-2e3);localStorage.setItem(r,JSON.stringify(e))}catch{}}}},27413:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(12588).A)("languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]])},45005:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(12588).A)("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]])},46029:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(12588).A)("radio",[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]])},54333:(e,t,a)=>{a.d(t,{SaveToWorkspaceButton:()=>l});var r=a(95155),i=a(12115),n=a(46539);function s(){window.location.href=`/signin?redirect=${encodeURIComponent(window.location.pathname+window.location.search)}`}function l({articleId:e,className:t="",contentType:a,imageUrl:d,sourceName:c,summary:o,title:m,url:u}){let[h,x]=(0,i.useState)("idle"),[f,p]=(0,i.useState)("");async function g(){if(!(0,n.vX)())return void s();x("saving"),p("");try{let t=(0,n.kG)(),{data:{session:r},error:i}=await t.auth.getSession();if(i)throw i;let l=r?.user.id;if(!l)return void s();let{data:h,error:f}=await t.from("materials").select("id").eq("user_id",l).eq("article_id",e).limit(1).maybeSingle();if(f)throw f;if(h?.id){x("saved"),p("已在知识库");return}let{error:g}=await t.from("materials").insert({user_id:l,article_id:e,content_type:a,title:m,url:u,source_name:c,summary:o,image_url:d});if(g)throw g;x("saved"),p("已保存到知识库")}catch(e){x("error"),p(e instanceof Error?e.message:"保存失败")}}return(0,r.jsxs)("span",{className:"inline-flex items-center gap-2","data-no-navigate":!0,children:[(0,r.jsx)("button",{"aria-label":"保存到知识库",className:`inline-flex min-h-7 items-center rounded-md border border-slate-200 bg-white px-2.5 py-1 text-xs font-semibold leading-tight text-slate-600 hover:border-cyan-200 hover:text-cyan-700 disabled:cursor-wait disabled:opacity-70 ${t}`,disabled:"saving"===h,onClick:g,type:"button",children:"saving"===h?"保存中":"saved"===h?"已保存":"保存到知识库"}),f?(0,r.jsx)("span",{className:`text-xs ${"error"===h?"text-rose-600":"text-emerald-700"}`,role:"status",children:f}):null]})}},57420:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(12588).A)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},59160:(e,t,a)=>{a.r(t),a.d(t,{ArticleCard:()=>z});var r=a(95155),i=a(97810),n=a(69253),s=a(45005),l=a(96035),d=a(46029),c=a(57420),o=a(84980),m=a(11951),u=a(94290),h=a(27413),x=a(12115),f=a(50910),p=a(11697),g=a(54333),y=a(69373),w=a(15737);let b={article:{icon:i.A},podcast:{icon:n.A},video:{icon:s.A},tweet:{icon:l.A},trending:{icon:d.A}};function v(e,t,a){let r=new Date(e.created_at),i=new Date,n=Math.round((new Date(i.getFullYear(),i.getMonth(),i.getDate()).getTime()-new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime())/864e5);return 0===n?t:1===n?a:r.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}function j(e,t){return e.translations?.["en"===t?"en":"zh"]??null}function N({sourceName:e}){let t=e.trim().slice(0,2)||"AI";return(0,r.jsx)("div",{className:"flex h-full w-full items-center justify-center rounded-md border border-slate-200 bg-slate-50 text-center shadow-sm",children:(0,r.jsx)("span",{className:"rounded-md bg-white px-3 py-2 text-[17px] font-bold text-slate-700 shadow-sm",children:t})})}function k({article:e}){let t=function(e){try{let t=new URL(e).hostname.replace(/^www\./,"");if(!t)return null;return`https://www.google.com/s2/favicons?domain=${t}&sz=128`}catch{return null}}(e.url);return t?(0,r.jsx)("div",{className:"flex h-full w-full items-center justify-center rounded-md border border-slate-200 bg-slate-50 p-8 shadow-sm",children:(0,r.jsx)("img",{alt:`${e.source_name} 图标`,className:"h-full w-full rounded-md object-contain opacity-90",height:128,loading:"lazy",src:t,width:128})}):(0,r.jsx)(N,{sourceName:e.source_name})}function _({article:e,className:t,priority:a=!1}){let n=A(e);return(0,r.jsxs)("div",{className:`relative shrink-0 group ${t}`,children:[(0,r.jsx)("a",{"aria-label":"查看此内容",className:"absolute inset-0 z-10 flex items-center justify-center rounded-md bg-black/0 transition-all duration-300 hover:bg-black/25",href:n,children:(0,r.jsx)(i.A,{"aria-hidden":"true",className:"h-10 w-10 text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100"})}),(0,r.jsx)("div",{className:"relative h-full w-full overflow-hidden rounded-md",children:e.image_url?(0,r.jsx)("img",{alt:e.title,className:"h-full w-full rounded-md object-cover shadow-sm transition-transform duration-300 group-hover:scale-[1.02]",height:160,loading:a?"eager":"lazy",src:e.image_url,width:160}):(0,r.jsx)(k,{article:e})})]})}function A(e){return"video"===e.content_type?`/video/${e.id}`:`/articles/${e.id}`}function S({article:e,wordCount:t,readingMinutes:a,compact:i=!1}){let n=(0,f.c)("common"),s=n("today"),l=n("yesterday"),m=Math.min(100,Math.max(0,Math.round(10*e.score))),u=i?"h-3.5 w-3.5":"h-3 w-3",h=`${t} 字 (约 ${a} 分钟)`;return i?(0,r.jsxs)("div",{className:"flex flex-col gap-1 text-sm text-slate-500",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)(d.A,{"aria-hidden":"true",className:u}),(0,r.jsx)("span",{className:"font-medium text-slate-700",children:e.source_name})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)(c.A,{"aria-hidden":"true",className:u}),(0,r.jsx)("time",{dateTime:e.created_at,children:v(e,s,l)})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)(o.A,{"aria-hidden":"true",className:u}),(0,r.jsx)("span",{children:h})]}),(0,r.jsx)(M,{score:m})]}):(0,r.jsxs)("div",{className:"mt-1.5 flex flex-wrap items-center gap-2 text-xs text-slate-500",children:[(0,r.jsx)("span",{className:"font-medium text-slate-700",children:e.source_name}),(0,r.jsx)("span",{"aria-hidden":"true",className:"text-slate-300",children:"\xb7"}),(0,r.jsx)("time",{dateTime:e.created_at,children:v(e,s,l)}),(0,r.jsx)("span",{"aria-hidden":"true",className:"text-slate-300",children:"\xb7"}),(0,r.jsx)("span",{children:h}),(0,r.jsx)(M,{className:"ml-1",score:m})]})}function M({score:e,className:t=""}){let a=(0,f.c)("common");return(0,r.jsxs)("div",{"aria-label":a("contentQualityScore",{score:e}),className:`inline-flex min-h-7 items-center gap-1 rounded-md border border-amber-200 bg-amber-50 px-2.5 py-1 text-xs font-medium leading-tight text-amber-900 ${t}`,title:a("contentQualityScore",{score:e}),children:[(0,r.jsx)(m.A,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),(0,r.jsx)("span",{className:"font-mono font-semibold tabular-nums",children:e})]})}function $({type:e}){let t=(0,f.c)("contentType"),a=(b[e]||b.article).icon;return(0,r.jsxs)("span",{className:"inline-flex min-h-7 items-center gap-1 rounded-md border border-cyan-200 bg-cyan-50 px-2.5 py-1 text-xs font-medium leading-tight text-cyan-800",children:[(0,r.jsx)(a,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),t(e)]})}function z({article:e,isFollowedSource:t=!1,priority:a=!1}){let i,n,s=(0,f.c)("common"),l=(0,p.Ym)(),d=(i=j(e,l),i?.tags&&i.tags.length>0?i.tags:e.tags||[]),c=function(e){if(e.word_count)return e.word_count;
1let t=[e.summary,e.content_markdown,...e.takeaways].filter(Boolean).join(" ");return t.match(/[A-Za-z0-9]+|[\u4e00-\u9fff]/g)?.length||0}(e),o=e.reading_minutes?e.reading_minutes:Math.max(1,Math.ceil(c/300)),b=function(e,t){let a=j(e,t);return a?.summary?a.summary:e.summary?e.summary:e.takeaways.length>0?e.takeaways.join(" "):"这篇内容已经进入精选池,正在等待 AI 摘要补齐。"}(e,l),v=(n=e.takeaways.find(e=>e&&e.trim().length>0))?n.trim():e.score>=9?"高分内容,信息密度和参考价值都比较突出":null,N=function(e,t){let a=j(e,t);if(a?.title)return a.title;let r=(e.title||"").trim();if(r)return r;let i=(e.summary||"").trim();if(i){let e=i.split(/\n/).map(e=>e.trim()).find(Boolean)||i;return e.length>80?`${e.slice(0,80)}…`:e}return`来自 ${e.source_name}`}(e,l),k=e.language||"中文",M=A(e),[D,C]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{C((0,w.$)(e.id))},[e.id]),(0,r.jsx)("div",{className:"animate-fade-in-up opacity-0",children:(0,r.jsxs)("article",{"aria-label":`${N} - ${e.source_name}`,className:`group relative min-h-[180px] rounded-xl border border-slate-200 bg-white p-3 shadow-sm transition-all duration-200 hover:border-slate-400 hover:shadow-[0_14px_35px_rgb(15,23,42,0.08)] sm:min-h-[210px] sm:p-5${D?" opacity-60":""}`,role:"article",children:[(0,r.jsx)("a",{"aria-hidden":"true",className:"absolute inset-0 z-0 rounded-xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-900 focus-visible:ring-offset-2",href:M,onClick:()=>
1{(0,w.U)(e.id),C(!0),(0,y.W)(e.id,"card")},tabIndex:-1}),(0,r.jsxs)("div",{className:"relative z-[1] flex flex-row gap-3 md:gap-4",children:[(0,r.jsx)(_,{article:e,className:"h-28 w-28 sm:h-32 sm:w-32 md:h-36 md:w-36",priority:a}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"line-clamp-2 text-base font-semibold leading-snug text-slate-950 md:text-lg",children:(0,r.jsx)("a",{className:"relative z-[2] hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-900",href:M,children:N})}),(0,r.jsx)(S,{article:e,readingMinutes:o,wordCount:c})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("p",{className:"line-clamp-3 leading-relaxed text-slate-500",title:b,children:b}),(0,r.jsx)("div",{"aria-hidden":"true",className:"absolute inset-x-0 bottom-0 h-6 bg-gradient-to-t from-white to-transparent"})]}),v?(0,r.jsxs)("p",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs leading-5 text-amber-900",children:["入选理由:",v]}):null]})]}),(0,r.jsxs)("div",{className:"relative z-[2] mt-3 flex flex-wrap items-center gap-1.5 border-t border-slate-200/70 pt-2 sm:mt-4",children:[(0,r.jsxs)("span",{className:"mr-1 inline-flex items-center gap-1 text-xs font-medium text-amber-700",children:[(0,r.jsx)(m.A,{"aria-hidden":"true",className:"h-3 w-3"}),(0,r.jsx)("span",{children:s("featured")})]}),t&&(0,r.jsxs)("span",{className:"inline-flex min-h-7 items-center gap-1 rounded-md border border-cyan-200 bg-cyan-50 px-2.5 py-1 text-xs font-medium leading-tight text-cyan-800",children:[(0,r.jsx)(u.A,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),s("followedSource")]}),(0,r.jsx)($,{type:e.content_type}),d.map((e,t)=>(0,r.jsxs)("span",{className:`inline-flex min-h-7 items-center rounded-md border px-2.5 py-1 text-xs font-medium leading-tight transition-colors ${0===t?"border-slate-300 bg-slate-100 text-slate-800":"border-slate-200 bg-white text-slate-500 hover:border-slate-400"}`,children:["#",e]},e)),(0,r.jsxs)("span",{className:"inline-flex min-h-7 items-center gap-1 rounded-md border border-emerald-200 bg-emerald-50 px-2.5 py-1 text-xs font-medium leading-tight text-emerald-700",children:[(0,r.jsx)(h.A,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),k]}),(0,r.jsx)("div",{className:"ml-auto flex flex-wrap items-center gap-1.5",children:(0,r.jsx)(g.SaveToWorkspaceButton,{articleId:e.id,contentType:e.content_type,imageUrl:e.image_url,sourceName:e.source_name,summary:e.summary,title:e.title,url:e.url})})]})]})})}},69253:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(12588).A)("mic-vocal",[["path",{d:"m11 7.601-5.994 8.19a1 1 0 0 0 .1 1.298l.817.818a1 1 0 0 0 1.314.087L15.09 12",key:"80a601"}],["path",{d:"M16.5 21.174C15.5 20.5 14.372 20 13 20c-2.058 0-3.928 2.356-6 2-2.072-.356-2.775-3.369-1.5-4.5",key:"j0ngtp"}],["circle",{cx:"16",cy:"7",r:"5",key:"d08jfb"}]])},69373:(e,t,a)=>{a.d(t,{D:()=>n,W:()=>i});var r=a(46539);async function i(e,t="card"){if(e&&(0,r.vX)())try{let a=(0,r.kG)(),{data:{user:i}}=await a.auth.getUser();if(!i)return;await a.from("article_views").upsert({user_id:i.id,article_id:e,view_date:new Date().toISOString().slice(0,10),viewed_at:new Date().toISOString(),referrer:t},{onConflict:"user_id,article_id,view_date",ignoreDuplicates:!0})}catch{}}async function n(e=30){if(!(0,r.vX)())return new Set;try{let t=(0,r.kG)(),{data:{user:a}}=await t.auth.getUser();if(!a)return new Set;let i=new Date;i.setDate(i.getDate()-e);let{data:n}=await t.from("article_views").select("article_id").eq("user_id",a.id).gte("viewed_at",i.toISOString()).order("viewed_at",{ascending:!1});return new Set((n??[]).map(e=>e.article_id))}catch{return new Set}}},84980:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(12588).A)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]])},94290:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(12588).A)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])},96035:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(12588).A)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]])},97810:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(12588).A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]])}}]);

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.