Spaces:
Running
Running
去掉投稿关键词;显示最新5条全文
Browse files
public/assets/App-Bohv_IyV.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
public/assets/App-i40HN5lx.js
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
public/assets/{index-D9dSVQpq.js → index-BjC_XL_x.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DVnMNIL7.js","assets/index-BlGQAcOD.js","assets/client-AKktr1VV.js","assets/index-BAR9Cs2t.js","assets/index-I8sxrB3i.js","assets/useInfiniteQuery-C79myQGA.js","assets/App-
|
| 2 |
(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))f(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const s of t.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&f(s)}).observe(document,{childList:!0,subtree:!0});function i(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function f(e){if(e.ep)return;e.ep=!0;const t=i(e);fetch(e.href,t)}})();const w="modulepreload",E=function(o){return"/"+o},g={},y=function(c,i,f){let e=Promise.resolve();if(i&&i.length>0){let s=function(a){return Promise.all(a.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),m=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));e=s(i.map(a=>{if(a=E(a),a in g)return;g[a]=!0;const u=a.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${d}`))return;const l=document.createElement("link");if(l.rel=u?"stylesheet":w,u||(l.as="script"),l.crossOrigin="",l.href=a,m&&l.setAttribute("nonce",m),document.head.appendChild(l),u)return new Promise((n,p)=>{l.addEventListener("load",n),l.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})}))}function t(s){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=s,window.dispatchEvent(r),!r.defaultPrevented)throw s}return e.then(s=>{for(const r of s||[])r.status==="rejected"&&t(r.reason);return c().catch(t)})};/**
|
| 3 |
* @license MIT <https://opensource.org/licenses/MIT>
|
| 4 |
* @copyright Michael Hart 2024
|
| 5 |
-
*/new TextEncoder;Math.random().toString(36).slice(2,10);const h="__dep_reload",v=6,L=6e4;function O(){try{return JSON.parse(sessionStorage.getItem(h)||"{}")}catch{return{c:0,t:0}}}async function P(){const o=document.getElementById("root");try{let c=function(){if(!document.querySelector("[data-surf-placeholder]"))try{window.parent.postMessage({type:"surf-app-ready"},"*")}catch{}};const i=await y(()=>import("./index-DVnMNIL7.js").then(n=>n.R),__vite__mapDeps([0,1]));if(typeof i.useState!="function")throw new Error("dep-stub");const{createElement:f}=i,{createRoot:e,hydrateRoot:t}=await y(async()=>{const{createRoot:n,hydrateRoot:p}=await import("./client-AKktr1VV.js").then(_=>_.c);return{createRoot:n,hydrateRoot:p}},__vite__mapDeps([2,1,3])),{QueryClient:s,QueryClientProvider:r}=await y(async()=>{const{QueryClient:n,QueryClientProvider:p}=await import("./index-I8sxrB3i.js");return{QueryClient:n,QueryClientProvider:p}},__vite__mapDeps([4,0,1,5])),{default:m}=await y(async()=>{const{default:n}=await import("./App-
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DVnMNIL7.js","assets/index-BlGQAcOD.js","assets/client-AKktr1VV.js","assets/index-BAR9Cs2t.js","assets/index-I8sxrB3i.js","assets/useInfiniteQuery-C79myQGA.js","assets/App-Bohv_IyV.js","assets/jsx-dev-runtime-Czb3f8pQ.js","assets/ErrorBoundary-88qkXQ7I.js"])))=>i.map(i=>d[i]);
|
| 2 |
(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))f(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const s of t.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&f(s)}).observe(document,{childList:!0,subtree:!0});function i(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function f(e){if(e.ep)return;e.ep=!0;const t=i(e);fetch(e.href,t)}})();const w="modulepreload",E=function(o){return"/"+o},g={},y=function(c,i,f){let e=Promise.resolve();if(i&&i.length>0){let s=function(a){return Promise.all(a.map(u=>Promise.resolve(u).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const r=document.querySelector("meta[property=csp-nonce]"),m=(r==null?void 0:r.nonce)||(r==null?void 0:r.getAttribute("nonce"));e=s(i.map(a=>{if(a=E(a),a in g)return;g[a]=!0;const u=a.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${d}`))return;const l=document.createElement("link");if(l.rel=u?"stylesheet":w,u||(l.as="script"),l.crossOrigin="",l.href=a,m&&l.setAttribute("nonce",m),document.head.appendChild(l),u)return new Promise((n,p)=>{l.addEventListener("load",n),l.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${a}`)))})}))}function t(s){const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=s,window.dispatchEvent(r),!r.defaultPrevented)throw s}return e.then(s=>{for(const r of s||[])r.status==="rejected"&&t(r.reason);return c().catch(t)})};/**
|
| 3 |
* @license MIT <https://opensource.org/licenses/MIT>
|
| 4 |
* @copyright Michael Hart 2024
|
| 5 |
+
*/new TextEncoder;Math.random().toString(36).slice(2,10);const h="__dep_reload",v=6,L=6e4;function O(){try{return JSON.parse(sessionStorage.getItem(h)||"{}")}catch{return{c:0,t:0}}}async function P(){const o=document.getElementById("root");try{let c=function(){if(!document.querySelector("[data-surf-placeholder]"))try{window.parent.postMessage({type:"surf-app-ready"},"*")}catch{}};const i=await y(()=>import("./index-DVnMNIL7.js").then(n=>n.R),__vite__mapDeps([0,1]));if(typeof i.useState!="function")throw new Error("dep-stub");const{createElement:f}=i,{createRoot:e,hydrateRoot:t}=await y(async()=>{const{createRoot:n,hydrateRoot:p}=await import("./client-AKktr1VV.js").then(_=>_.c);return{createRoot:n,hydrateRoot:p}},__vite__mapDeps([2,1,3])),{QueryClient:s,QueryClientProvider:r}=await y(async()=>{const{QueryClient:n,QueryClientProvider:p}=await import("./index-I8sxrB3i.js");return{QueryClient:n,QueryClientProvider:p}},__vite__mapDeps([4,0,1,5])),{default:m}=await y(async()=>{const{default:n}=await import("./App-Bohv_IyV.js");return{default:n}},__vite__mapDeps([6,7,1,0,5,3])),{default:a}=await y(async()=>{const{default:n}=await import("./ErrorBoundary-88qkXQ7I.js");return{default:n}},__vite__mapDeps([8,7,1,0])),u=new s({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,retryDelay:n=>Math.min(1e3*2**n,1e4),staleTime:3e4}}}),d=f(a,null,f(r,{client:u},f(m))),l=!!o.querySelector("[data-surf-placeholder]");o.childNodes.length>0&&o.innerHTML!=="<!--ssr-outlet-->"&&!l?t(o,d):(o.innerHTML="",e(o).render(d)),window.__reactOk=!0,sessionStorage.removeItem(h),c(),new MutationObserver(c).observe(o,{childList:!0,subtree:!0})}catch{const c=O(),i=Date.now()-c.t>L?0:c.c;i<v?(o.innerHTML=['<div style="padding:24px;text-align:center;font-family:system-ui,sans-serif">','<p style="color:#3b82f6;font-weight:600;margin:0 0 4px">Loading dependencies...</p>','<p style="color:#3b82f6;opacity:0.7;font-size:12px;margin:0">Reloading automatically</p>',"</div>"].join(""),sessionStorage.setItem(h,JSON.stringify({c:i+1,t:Date.now()})),setTimeout(()=>location.reload(),3e3+i*1e3)):o.innerHTML=['<div style="padding:24px;text-align:center;font-family:system-ui,sans-serif">','<p style="color:#c0392b;font-weight:600;margin:0 0 4px">Failed to load dependencies</p>','<p style="color:#c0392b;opacity:0.8;font-size:12px;margin:0">Please refresh the page</p>',"</div>"].join("")}}P();
|
public/assets/{index-BLm_Mame.css → index-up1vr0PA.css}
RENAMED
|
The diff for this file is too large to render.
See raw diff
|
|
|
public/index.html
CHANGED
|
@@ -58,8 +58,8 @@
|
|
| 58 |
<script>
|
| 59 |
document.documentElement.classList.add('dark');
|
| 60 |
</script>
|
| 61 |
-
<script type="module" crossorigin src="/assets/index-
|
| 62 |
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
| 63 |
</head>
|
| 64 |
<body>
|
| 65 |
<div id="root"><!--ssr-outlet--></div>
|
|
|
|
| 58 |
<script>
|
| 59 |
document.documentElement.classList.add('dark');
|
| 60 |
</script>
|
| 61 |
+
<script type="module" crossorigin src="/assets/index-BjC_XL_x.js"></script>
|
| 62 |
+
<link rel="stylesheet" crossorigin href="/assets/index-up1vr0PA.css">
|
| 63 |
</head>
|
| 64 |
<body>
|
| 65 |
<div id="root"><!--ssr-outlet--></div>
|
server.js
CHANGED
|
@@ -83771,8 +83771,17 @@ var sleep3 = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
| 83771 |
var state = null;
|
| 83772 |
var job = null;
|
| 83773 |
var saveTimer = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83774 |
async function load() {
|
| 83775 |
-
if (!state)
|
| 83776 |
state = await loadPrivate(FILE2, {
|
| 83777 |
updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
| 83778 |
bot: BOT,
|
|
@@ -83783,6 +83792,8 @@ async function load() {
|
|
| 83783 |
queue: [],
|
| 83784 |
items: []
|
| 83785 |
});
|
|
|
|
|
|
|
| 83786 |
return state;
|
| 83787 |
}
|
| 83788 |
async function save(now = false) {
|
|
@@ -83905,14 +83916,12 @@ function judge(texts) {
|
|
| 83905 |
else if (median < 40) verdict = "\u95F2\u804A\u7FA4";
|
| 83906 |
else verdict = "\u5176\u4ED6";
|
| 83907 |
const score = Math.round(100 * (0.6 * story + 0.25 * Math.min(1, median / 400) + 0.15 * (1 - promo)));
|
| 83908 |
-
const samples = posts.filter((t) => !isPromo(t)).sort((a, b) => [...b].length - [...a].length).slice(0, 3).map((t) => ({ text: [...t].slice(0, 220).join(""), chars: [...t].length }));
|
| 83909 |
return {
|
| 83910 |
verdict,
|
| 83911 |
suitable: verdict === "\u957F\u6587\u6545\u4E8B" || verdict === "\u77ED\u6587\u6545\u4E8B",
|
| 83912 |
score,
|
| 83913 |
adult,
|
| 83914 |
-
stats: { n, median, avg, long: +long.toFixed(2), story: +story.toFixed(2), promo: +promo.toFixed(2) }
|
| 83915 |
-
samples
|
| 83916 |
};
|
| 83917 |
}
|
| 83918 |
async function viaWeb(c) {
|
|
@@ -83924,7 +83933,7 @@ async function viaWeb(c) {
|
|
| 83924 |
if (min > 1) posts = posts.concat((await fetchWebPage(c.username, min).catch(() => null))?.posts ?? []);
|
| 83925 |
}
|
| 83926 |
posts.sort((a, b) => b.post_id - a.post_id);
|
| 83927 |
-
return {
|
| 83928 |
}
|
| 83929 |
async function viaAccount(c) {
|
| 83930 |
const cl = getClient();
|
|
@@ -83934,10 +83943,10 @@ async function viaAccount(c) {
|
|
| 83934 |
const ent = await throttled(() => cl.getEntity(peer));
|
| 83935 |
if (ent instanceof import_telegram2.Api.User) throw new Error("\u8FD9\u662F\u4E2A\u4EBA\u8D26\u53F7\u6216\u673A\u5668\u4EBA");
|
| 83936 |
const msgs = await throttled(() => cl.getMessages(ent, { limit: 80 }));
|
| 83937 |
-
const
|
| 83938 |
const kind = ent instanceof import_telegram2.Api.Channel ? ent.megagroup || ent.gigagroup ? "group" : "channel" : "group";
|
| 83939 |
const first = msgs.find((m) => m instanceof import_telegram2.Api.Message);
|
| 83940 |
-
return {
|
| 83941 |
}
|
| 83942 |
async function recentTexts(c) {
|
| 83943 |
try {
|
|
@@ -83952,7 +83961,10 @@ async function recentTexts(c) {
|
|
| 83952 |
async function check(c) {
|
| 83953 |
try {
|
| 83954 |
const r = await recentTexts(c);
|
| 83955 |
-
|
|
|
|
|
|
|
|
|
|
| 83956 |
status: "checked",
|
| 83957 |
title: r.title || c.title,
|
| 83958 |
kind: r.kind || c.kind,
|
|
@@ -84022,7 +84034,7 @@ async function checkQueue(ctl) {
|
|
| 84022 |
const name = s.queue[0];
|
| 84023 |
const c = byName.get(name.toLowerCase());
|
| 84024 |
done++;
|
| 84025 |
-
if (c && c.status === "pending") {
|
| 84026 |
s.phase = `\u6B63\u5728\u8BFB\u53D6\u9891\u9053\u5185\u5BB9\u5E76\u5224\u65AD\uFF08${done}/${total}\uFF09\uFF1A${c.title}`;
|
| 84027 |
try {
|
| 84028 |
await check(c);
|
|
|
|
| 83771 |
var state = null;
|
| 83772 |
var job = null;
|
| 83773 |
var saveTimer = null;
|
| 83774 |
+
var DROPPED = ["\u6295\u7A3F"];
|
| 83775 |
+
function migrate(s) {
|
| 83776 |
+
s.keywords = s.keywords.filter((k) => !DROPPED.includes(k));
|
| 83777 |
+
for (const k of DROPPED) delete s.searched[k];
|
| 83778 |
+
for (const c of s.items) {
|
| 83779 |
+
c.keywords = c.keywords.filter((k) => !DROPPED.includes(k));
|
| 83780 |
+
if (c.suitable && c.samples_v !== 2 && !s.queue.some((q) => q.toLowerCase() === c.username.toLowerCase())) s.queue.push(c.username);
|
| 83781 |
+
}
|
| 83782 |
+
}
|
| 83783 |
async function load() {
|
| 83784 |
+
if (!state) {
|
| 83785 |
state = await loadPrivate(FILE2, {
|
| 83786 |
updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
| 83787 |
bot: BOT,
|
|
|
|
| 83792 |
queue: [],
|
| 83793 |
items: []
|
| 83794 |
});
|
| 83795 |
+
migrate(state);
|
| 83796 |
+
}
|
| 83797 |
return state;
|
| 83798 |
}
|
| 83799 |
async function save(now = false) {
|
|
|
|
| 83916 |
else if (median < 40) verdict = "\u95F2\u804A\u7FA4";
|
| 83917 |
else verdict = "\u5176\u4ED6";
|
| 83918 |
const score = Math.round(100 * (0.6 * story + 0.25 * Math.min(1, median / 400) + 0.15 * (1 - promo)));
|
|
|
|
| 83919 |
return {
|
| 83920 |
verdict,
|
| 83921 |
suitable: verdict === "\u957F\u6587\u6545\u4E8B" || verdict === "\u77ED\u6587\u6545\u4E8B",
|
| 83922 |
score,
|
| 83923 |
adult,
|
| 83924 |
+
stats: { n, median, avg, long: +long.toFixed(2), story: +story.toFixed(2), promo: +promo.toFixed(2) }
|
|
|
|
| 83925 |
};
|
| 83926 |
}
|
| 83927 |
async function viaWeb(c) {
|
|
|
|
| 83933 |
if (min > 1) posts = posts.concat((await fetchWebPage(c.username, min).catch(() => null))?.posts ?? []);
|
| 83934 |
}
|
| 83935 |
posts.sort((a, b) => b.post_id - a.post_id);
|
| 83936 |
+
return { posts: posts.slice(0, 30).map((p) => ({ text: p.text || "", at: p.posted_at ?? null })), title: p1.title, last: posts[0]?.posted_at ?? null, kind: "channel" };
|
| 83937 |
}
|
| 83938 |
async function viaAccount(c) {
|
| 83939 |
const cl = getClient();
|
|
|
|
| 83943 |
const ent = await throttled(() => cl.getEntity(peer));
|
| 83944 |
if (ent instanceof import_telegram2.Api.User) throw new Error("\u8FD9\u662F\u4E2A\u4EBA\u8D26\u53F7\u6216\u673A\u5668\u4EBA");
|
| 83945 |
const msgs = await throttled(() => cl.getMessages(ent, { limit: 80 }));
|
| 83946 |
+
const posts = msgs.filter((m) => m instanceof import_telegram2.Api.Message && !!m.message?.trim()).slice(0, 30).map((m) => ({ text: m.message, at: new Date(m.date * 1e3).toISOString() }));
|
| 83947 |
const kind = ent instanceof import_telegram2.Api.Channel ? ent.megagroup || ent.gigagroup ? "group" : "channel" : "group";
|
| 83948 |
const first = msgs.find((m) => m instanceof import_telegram2.Api.Message);
|
| 83949 |
+
return { posts, title: ent.title, last: first ? new Date(first.date * 1e3).toISOString() : null, kind };
|
| 83950 |
}
|
| 83951 |
async function recentTexts(c) {
|
| 83952 |
try {
|
|
|
|
| 83961 |
async function check(c) {
|
| 83962 |
try {
|
| 83963 |
const r = await recentTexts(c);
|
| 83964 |
+
const latest = r.posts.filter((p) => p.text.trim()).slice(0, 5);
|
| 83965 |
+
Object.assign(c, judge(r.posts.map((p) => p.text)), {
|
| 83966 |
+
samples: latest.map((p) => ({ text: p.text.trim(), chars: [...p.text.trim()].length, at: p.at })),
|
| 83967 |
+
samples_v: 2,
|
| 83968 |
status: "checked",
|
| 83969 |
title: r.title || c.title,
|
| 83970 |
kind: r.kind || c.kind,
|
|
|
|
| 84034 |
const name = s.queue[0];
|
| 84035 |
const c = byName.get(name.toLowerCase());
|
| 84036 |
done++;
|
| 84037 |
+
if (c && (c.status === "pending" || c.suitable && c.samples_v !== 2)) {
|
| 84038 |
s.phase = `\u6B63\u5728\u8BFB\u53D6\u9891\u9053\u5185\u5BB9\u5E76\u5224\u65AD\uFF08${done}/${total}\uFF09\uFF1A${c.title}`;
|
| 84039 |
try {
|
| 84040 |
await check(c);
|