karin-plugin-kkk 2.10.0 → 2.10.1
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.
- package/CHANGELOG.md +7 -0
- package/lib/apps/admin.js +2 -2
- package/lib/apps/help.js +1 -1
- package/lib/apps/push.js +1 -1
- package/lib/apps/tools.js +1 -1
- package/lib/apps/update.js +1 -1
- package/lib/core_chunk/{main-C9PbsRcQ.js → main-DmgB1OAs.js} +67 -76
- package/lib/index.js +1 -1
- package/lib/root.js +1 -1
- package/lib/web.config.js +1 -1
- package/lib/web_chunk/assets/{Combination-B0isE5YN.js → Combination-DJPQOZnG.js} +1 -1
- package/lib/web_chunk/assets/{avatar-BozwxkNS.js → avatar-CVUSg_9F.js} +1 -1
- package/lib/web_chunk/assets/{core-CWVj8hav.js → core-9yYShXfI.js} +1 -1
- package/lib/web_chunk/assets/{eye-BK5VNl1K.js → eye-CNKw0yO_.js} +1 -1
- package/lib/web_chunk/assets/{index-lVzKXtN0.js → index-KepoosZz.js} +2 -2
- package/lib/web_chunk/assets/{jszip.min-FEzvIcie.js → jszip.min-DGJnq-7F.js} +1 -1
- package/lib/web_chunk/assets/{page-CadSZ5a-.js → page-B-aUNZ9K.js} +1 -1
- package/lib/web_chunk/assets/{page-yEHdNiMZ.js → page-BrnVAZTM.js} +1 -1
- package/lib/web_chunk/assets/{page-BwfHUs--.js → page-m4ZQ7UYd.js} +1 -1
- package/lib/web_chunk/assets/{page-CD0Xlna8.js → page-s6WqUsIo.js} +4 -4
- package/lib/web_chunk/assets/{page-CPaC6rP6.js → page-vHLYlxK8.js} +2 -2
- package/lib/web_chunk/assets/{parsers-COSsxE71.js → parsers-DAtZA89s.js} +1 -1
- package/lib/web_chunk/assets/{request-DA-XDKi_.js → request-C6twYEuA.js} +1 -1
- package/lib/web_chunk/assets/{select-77l4BATe.js → select-CoIlL-_T.js} +1 -1
- package/lib/web_chunk/assets/{separator-3xgwszIe.js → separator-BjA7cK64.js} +1 -1
- package/lib/web_chunk/index.html +1 -1
- package/lib/web_chunk/sw.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [2.10.1](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.10.0...v2.10.1) (2025-11-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🐛 错误修复
|
|
9
|
+
|
|
10
|
+
* Cannot read properties ofundefined (reading'fan') ([6512c4e](https://github.com/ikenxuan/karin-plugin-kkk/commit/6512c4ec7fb200849d15c6abdc88768b28689ad9))
|
|
11
|
+
|
|
5
12
|
## [2.10.0](https://github.com/ikenxuan/karin-plugin-kkk/compare/v2.9.5...v2.10.0) (2025-11-01)
|
|
6
13
|
|
|
7
14
|
|
package/lib/apps/admin.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../core_chunk/vendor-CQA9XE1g.js";
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as removeAllFiles, E as task, S as dylogin, T as setdyck, w as setbilick, x as biLogin } from "../core_chunk/main-DmgB1OAs.js";
|
|
3
3
|
import "../core_chunk/template-B47WClaw.js";
|
|
4
|
-
export { biLogin, dylogin, setbilick, setdyck, task };
|
|
4
|
+
export { biLogin, dylogin, removeAllFiles, setbilick, setdyck, task };
|
package/lib/apps/help.js
CHANGED
package/lib/apps/push.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../core_chunk/vendor-CQA9XE1g.js";
|
|
2
|
-
import { _ as setdyPush, d as bilibiliPushList, f as changeBotID, g as setbiliPush, h as forcePush, m as douyinPushList, p as douyinPush, u as bilibiliPush, v as testDouyinPush } from "../core_chunk/main-
|
|
2
|
+
import { _ as setdyPush, d as bilibiliPushList, f as changeBotID, g as setbiliPush, h as forcePush, m as douyinPushList, p as douyinPush, u as bilibiliPush, v as testDouyinPush } from "../core_chunk/main-DmgB1OAs.js";
|
|
3
3
|
import "../core_chunk/template-B47WClaw.js";
|
|
4
4
|
export { bilibiliPush, bilibiliPushList, changeBotID, douyinPush, douyinPushList, forcePush, setbiliPush, setdyPush, testDouyinPush };
|
package/lib/apps/tools.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../core_chunk/vendor-CQA9XE1g.js";
|
|
2
|
-
import { a as bilibiliAPP, c as prefix, l as xiaohongshuAPP, o as douyinAPP, s as kuaishouAPP } from "../core_chunk/main-
|
|
2
|
+
import { a as bilibiliAPP, c as prefix, l as xiaohongshuAPP, o as douyinAPP, s as kuaishouAPP } from "../core_chunk/main-DmgB1OAs.js";
|
|
3
3
|
import "../core_chunk/template-B47WClaw.js";
|
|
4
4
|
export { bilibiliAPP, douyinAPP, kuaishouAPP, prefix, xiaohongshuAPP };
|
package/lib/apps/update.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "../core_chunk/vendor-CQA9XE1g.js";
|
|
2
|
-
import { i as update, n as kkkUpdateCommand, r as kkkUpdateTest, t as kkkUpdate } from "../core_chunk/main-
|
|
2
|
+
import { i as update, n as kkkUpdateCommand, r as kkkUpdateTest, t as kkkUpdate } from "../core_chunk/main-DmgB1OAs.js";
|
|
3
3
|
import "../core_chunk/template-B47WClaw.js";
|
|
4
4
|
export { kkkUpdate, kkkUpdateCommand, kkkUpdateTest, update };
|
|
@@ -184,13 +184,13 @@ var init_Base = __esmMin(() => {
|
|
|
184
184
|
maxRetries: 3
|
|
185
185
|
}).downloadStream((downloadedBytes, totalBytes$1) => {
|
|
186
186
|
const barLength = 45;
|
|
187
|
-
|
|
187
|
+
const generateProgressBar = (progressPercentage$1) => {
|
|
188
188
|
const filledLength = Math.floor(progressPercentage$1 / 100 * barLength);
|
|
189
189
|
let progress = "";
|
|
190
190
|
progress += "█".repeat(filledLength);
|
|
191
191
|
progress += "░".repeat(Math.max(0, barLength - filledLength - 1));
|
|
192
192
|
return `[${progress}]`;
|
|
193
|
-
}
|
|
193
|
+
};
|
|
194
194
|
const progressPercentage = downloadedBytes / totalBytes$1 * 100;
|
|
195
195
|
const red = Math.floor(255 - 255 * progressPercentage / 100);
|
|
196
196
|
const coloredPercentage = logger.chalk.rgb(red, 255, 0)(`${progressPercentage.toFixed(1)}%`);
|
|
@@ -4587,13 +4587,9 @@ var Bilibili = class extends Base {
|
|
|
4587
4587
|
}
|
|
4588
4588
|
}
|
|
4589
4589
|
};
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
function br$3(data) {
|
|
4594
|
-
return data = data.replace(/\n/g, "<br>");
|
|
4595
|
-
}
|
|
4596
|
-
function replacetext(text, rich_text_nodes) {
|
|
4590
|
+
var checkvip$2 = (member) => member.vip.status === 1 ? `<span style="color: ${member.vip.nickname_color ?? "#FB7299"}; font-weight: 700;">${member.name}</span>` : `<span style="color: ${Common.useDarkTheme() ? "#e9e9e9" : "#313131"}; font-weight: 700;">${member.name}</span>`;
|
|
4591
|
+
var br$3 = (data) => data = data.replace(/\n/g, "<br>");
|
|
4592
|
+
const replacetext = (text, rich_text_nodes) => {
|
|
4597
4593
|
for (const tag of rich_text_nodes) {
|
|
4598
4594
|
const escapedText = tag.orig_text.replace(/([.*+?^${}()|[\]\\])/g, "\\$1").replace(/\n/g, "\\n");
|
|
4599
4595
|
const regex = new RegExp(escapedText, "g");
|
|
@@ -4626,7 +4622,7 @@ function replacetext(text, rich_text_nodes) {
|
|
|
4626
4622
|
}
|
|
4627
4623
|
}
|
|
4628
4624
|
return text;
|
|
4629
|
-
}
|
|
4625
|
+
};
|
|
4630
4626
|
var qnd = {
|
|
4631
4627
|
6: "极速 240P",
|
|
4632
4628
|
16: "流畅 360P",
|
|
@@ -4655,7 +4651,7 @@ const cover = (pic) => {
|
|
|
4655
4651
|
return imgArray;
|
|
4656
4652
|
};
|
|
4657
4653
|
const generateDecorationCard = (decorate) => decorate ? `<div style="display: flex; width: 500px; height: 150px; background-position: center; background-attachment: fixed; background-repeat: no-repeat; background-size: contain; align-items: center; justify-content: flex-end; background-image: url('${decorate.card_url}')">${generateGradientStyle(decorate.fan?.color_format?.colors, decorate.fan.num_str || decorate.fan.num_desc)}</div>` : "<div></div>";
|
|
4658
|
-
|
|
4654
|
+
var mapping_table = (type) => {
|
|
4659
4655
|
const Array$1 = {
|
|
4660
4656
|
1: [
|
|
4661
4657
|
"DYNAMIC_TYPE_AV",
|
|
@@ -4674,7 +4670,7 @@ function mapping_table(type) {
|
|
|
4674
4670
|
};
|
|
4675
4671
|
for (const key in Array$1) if (Array$1[key].includes(type)) return parseInt(key, 10);
|
|
4676
4672
|
return 1;
|
|
4677
|
-
}
|
|
4673
|
+
};
|
|
4678
4674
|
var oid = (dynamicINFO, dynamicInfoCard) => {
|
|
4679
4675
|
switch (dynamicINFO.data.item.type) {
|
|
4680
4676
|
case "DYNAMIC_TYPE_WORD":
|
|
@@ -4811,7 +4807,7 @@ const extractArticleImages = (content) => {
|
|
|
4811
4807
|
};
|
|
4812
4808
|
await init_module();
|
|
4813
4809
|
await init_Config();
|
|
4814
|
-
|
|
4810
|
+
const bilibiliComments = (commentsData, host_mid) => {
|
|
4815
4811
|
if (!commentsData) return [];
|
|
4816
4812
|
let jsonArray = [];
|
|
4817
4813
|
if (commentsData.code === 404) return [];
|
|
@@ -4960,7 +4956,7 @@ function bilibiliComments(commentsData, host_mid) {
|
|
|
4960
4956
|
res = br$2(jsonArray);
|
|
4961
4957
|
res = [...res.filter((c) => c.isTop), ...res.filter((c) => !c.isTop)].slice(0, Config.bilibili.numcomment);
|
|
4962
4958
|
return res;
|
|
4963
|
-
}
|
|
4959
|
+
};
|
|
4964
4960
|
var emoteToUrl = (message, emote) => {
|
|
4965
4961
|
for (const key in emote) if (Object.prototype.hasOwnProperty.call(emote, key)) {
|
|
4966
4962
|
if (message.includes(key)) {
|
|
@@ -4969,11 +4965,11 @@ var emoteToUrl = (message, emote) => {
|
|
|
4969
4965
|
}
|
|
4970
4966
|
return message;
|
|
4971
4967
|
};
|
|
4972
|
-
|
|
4968
|
+
var space = (data) => {
|
|
4973
4969
|
for (const i in data) if (data[i].message) data[i].message = data[i].message.replace(/ /g, " ");
|
|
4974
4970
|
return data;
|
|
4975
|
-
}
|
|
4976
|
-
|
|
4971
|
+
};
|
|
4972
|
+
var br$2 = (data) => {
|
|
4977
4973
|
for (const i in data) {
|
|
4978
4974
|
let message = data[i].message;
|
|
4979
4975
|
message = message?.replace(/\n/g, "<br>");
|
|
@@ -4983,11 +4979,9 @@ function br$2(data) {
|
|
|
4983
4979
|
}
|
|
4984
4980
|
}
|
|
4985
4981
|
return data;
|
|
4986
|
-
}
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
}
|
|
4990
|
-
function getRelativeTimeFromTimestamp$3(timestamp) {
|
|
4982
|
+
};
|
|
4983
|
+
var checkvip$1 = (member) => member.vip.vipStatus === 1 ? `<span style="color: ${member.vip.nickname_color ?? "#FB7299"}; font-weight: 700;">${member.uname}</span>` : `<span style="color: #888">${member.uname}</span>`;
|
|
4984
|
+
var getRelativeTimeFromTimestamp$3 = (timestamp) => {
|
|
4991
4985
|
const differenceInSeconds = Math.floor(Date.now() / 1e3) - timestamp;
|
|
4992
4986
|
if (differenceInSeconds < 30) return "刚刚";
|
|
4993
4987
|
else if (differenceInSeconds < 60) return differenceInSeconds + "秒前";
|
|
@@ -5002,9 +4996,10 @@ function getRelativeTimeFromTimestamp$3(timestamp) {
|
|
|
5002
4996
|
const day = date.getDate().toString().padStart(2, "0");
|
|
5003
4997
|
return year + "-" + month + "-" + day;
|
|
5004
4998
|
}
|
|
5005
|
-
}
|
|
5006
|
-
|
|
4999
|
+
};
|
|
5000
|
+
var extractFanCard = (member) => {
|
|
5007
5001
|
if (member.user_sailing_v2 && typeof member.user_sailing_v2 === "object" && Object.keys(member.user_sailing_v2).length > 0) {
|
|
5002
|
+
if (!member.user_sailing_v2.card_bg) return null;
|
|
5008
5003
|
const cardBg = member.user_sailing_v2.card_bg;
|
|
5009
5004
|
const fan = cardBg.fan;
|
|
5010
5005
|
if (!fan || !fan.is_fan) return null;
|
|
@@ -5022,10 +5017,10 @@ function extractFanCard(member) {
|
|
|
5022
5017
|
};
|
|
5023
5018
|
}
|
|
5024
5019
|
return null;
|
|
5025
|
-
}
|
|
5020
|
+
};
|
|
5026
5021
|
init_default();
|
|
5027
5022
|
init_Config();
|
|
5028
|
-
async
|
|
5023
|
+
const genParams = async (apiURL) => {
|
|
5029
5024
|
if (Config.cookies.bilibili === "" || Config.cookies.bilibili === null) return "&platform=html5";
|
|
5030
5025
|
const loginInfo = await getBilibiliData("登录基本信息", Config.cookies.bilibili);
|
|
5031
5026
|
const genSign = await wbi_sign(apiURL, Config.cookies.bilibili);
|
|
@@ -5047,8 +5042,8 @@ async function genParams(apiURL) {
|
|
|
5047
5042
|
loginInfo.data.data.vipStatus === 1 ? isvip = true : isvip = false;
|
|
5048
5043
|
if (isvip) return `&fnval=16&fourk=1&${genSign}`;
|
|
5049
5044
|
else return `&qn=${qn[3]}&fnval=16`;
|
|
5050
|
-
}
|
|
5051
|
-
async
|
|
5045
|
+
};
|
|
5046
|
+
const checkCk = async () => {
|
|
5052
5047
|
if (Config.cookies.bilibili === "" || Config.cookies.bilibili === null) return {
|
|
5053
5048
|
Status: "!isLogin",
|
|
5054
5049
|
isVIP: false
|
|
@@ -5064,9 +5059,9 @@ async function checkCk() {
|
|
|
5064
5059
|
Status: "isLogin",
|
|
5065
5060
|
isVIP
|
|
5066
5061
|
};
|
|
5067
|
-
}
|
|
5062
|
+
};
|
|
5068
5063
|
init_default();
|
|
5069
|
-
async
|
|
5064
|
+
const getBilibiliID = async (url) => {
|
|
5070
5065
|
const resp = await axios.get(url, { headers: { "User-Agent": "Apifox/1.0.0 (https://apifox.com)" } });
|
|
5071
5066
|
const longLink = resp?.request?.res?.responseUrl ?? resp?.config?.url ?? url;
|
|
5072
5067
|
let result = {};
|
|
@@ -5169,7 +5164,7 @@ async function getBilibiliID(url) {
|
|
|
5169
5164
|
}
|
|
5170
5165
|
console.log(result);
|
|
5171
5166
|
return result;
|
|
5172
|
-
}
|
|
5167
|
+
};
|
|
5173
5168
|
await init_default();
|
|
5174
5169
|
await init_utils();
|
|
5175
5170
|
await init_Config();
|
|
@@ -5818,13 +5813,9 @@ var Bilibilipush = class extends Base {
|
|
|
5818
5813
|
await this.e.reply(img$2);
|
|
5819
5814
|
}
|
|
5820
5815
|
};
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
function checkvip(member) {
|
|
5825
|
-
return member.vip.status === 1 ? `<span style="color: ${member.vip.nickname_color ?? "#FB7299"}; font-weight: 700;">${member.name}</span>` : `<span style="color: ${Common.useDarkTheme() ? "#EDEDED" : "#606060"}">${member.name}</span>`;
|
|
5826
|
-
}
|
|
5827
|
-
function extractEmojisData(data) {
|
|
5816
|
+
var br$1 = (data) => data = data.replace(/\n/g, "<br>");
|
|
5817
|
+
var checkvip = (member) => member.vip.status === 1 ? `<span style="color: ${member.vip.nickname_color ?? "#FB7299"}; font-weight: 700;">${member.name}</span>` : `<span style="color: ${Common.useDarkTheme() ? "#EDEDED" : "#606060"}">${member.name}</span>`;
|
|
5818
|
+
var extractEmojisData = (data) => {
|
|
5828
5819
|
const emojisData = [];
|
|
5829
5820
|
data.forEach((packages) => {
|
|
5830
5821
|
packages.emote.forEach((emote) => {
|
|
@@ -5835,7 +5826,7 @@ function extractEmojisData(data) {
|
|
|
5835
5826
|
});
|
|
5836
5827
|
});
|
|
5837
5828
|
return emojisData;
|
|
5838
|
-
}
|
|
5829
|
+
};
|
|
5839
5830
|
var skipDynamic$1 = async (PushItem) => {
|
|
5840
5831
|
const tags = [];
|
|
5841
5832
|
if (PushItem.Dynamic_Data.modules.module_dynamic?.desc?.rich_text_nodes) {
|
|
@@ -5907,7 +5898,7 @@ var processCommentImage = async (imageUrl) => {
|
|
|
5907
5898
|
}
|
|
5908
5899
|
return imageUrl;
|
|
5909
5900
|
};
|
|
5910
|
-
async
|
|
5901
|
+
const douyinComments = async (data, emojidata) => {
|
|
5911
5902
|
let jsonArray = [];
|
|
5912
5903
|
if (data.data.comments === null) return [];
|
|
5913
5904
|
let id = 1;
|
|
@@ -5982,8 +5973,8 @@ async function douyinComments(data, emojidata) {
|
|
|
5982
5973
|
jsonArray.unshift(commentTypeOne);
|
|
5983
5974
|
}
|
|
5984
5975
|
return { jsonArray };
|
|
5985
|
-
}
|
|
5986
|
-
|
|
5976
|
+
};
|
|
5977
|
+
var getRelativeTimeFromTimestamp$2 = (timestamp) => {
|
|
5987
5978
|
const differenceInSeconds = Math.floor(Date.now() / 1e3) - timestamp;
|
|
5988
5979
|
if (differenceInSeconds < 30) return "刚刚";
|
|
5989
5980
|
else if (differenceInSeconds < 60) return differenceInSeconds + "秒前";
|
|
@@ -5998,7 +5989,7 @@ function getRelativeTimeFromTimestamp$2(timestamp) {
|
|
|
5998
5989
|
const day = date.getDate().toString().padStart(2, "0");
|
|
5999
5990
|
return year + "-" + month + "-" + day;
|
|
6000
5991
|
}
|
|
6001
|
-
}
|
|
5992
|
+
};
|
|
6002
5993
|
await init_utils();
|
|
6003
5994
|
await init_Config();
|
|
6004
5995
|
var mp4size = "";
|
|
@@ -6292,7 +6283,7 @@ var DouYin = class extends Base {
|
|
|
6292
6283
|
}
|
|
6293
6284
|
}
|
|
6294
6285
|
};
|
|
6295
|
-
|
|
6286
|
+
const douyinProcessVideos = (videos, videoQuality, maxAutoVideoSize) => {
|
|
6296
6287
|
const mp4Videos = videos.filter((video) => video.format !== "dash");
|
|
6297
6288
|
if (mp4Videos.length === 0) {
|
|
6298
6289
|
logger.warn("没有找到可用的 mp4 格式视频");
|
|
@@ -6371,12 +6362,12 @@ function douyinProcessVideos(videos, videoQuality, maxAutoVideoSize) {
|
|
|
6371
6362
|
}
|
|
6372
6363
|
logger.warn("未找到任何匹配的画质,返回默认视频");
|
|
6373
6364
|
return [mp4Videos[0]];
|
|
6374
|
-
}
|
|
6375
|
-
|
|
6365
|
+
};
|
|
6366
|
+
const Time = (delay) => {
|
|
6376
6367
|
const currentDate = /* @__PURE__ */ new Date();
|
|
6377
6368
|
currentDate.setHours(currentDate.getHours() + delay);
|
|
6378
6369
|
return `${currentDate.getFullYear().toString()}/${(currentDate.getMonth() + 1).toString()}/${String(currentDate.getDate()).padStart(2, "0")} ${String(currentDate.getHours()).padStart(2, "0")}:${String(currentDate.getMinutes()).padStart(2, "0")}:${String(currentDate.getSeconds()).padStart(2, "0")}`;
|
|
6379
|
-
}
|
|
6370
|
+
};
|
|
6380
6371
|
const Emoji = (data) => {
|
|
6381
6372
|
const ListArray = [];
|
|
6382
6373
|
for (const i of data.emoji_list) {
|
|
@@ -6416,7 +6407,7 @@ var getStringDisplayWidth = (str) => {
|
|
|
6416
6407
|
}
|
|
6417
6408
|
return width;
|
|
6418
6409
|
};
|
|
6419
|
-
async
|
|
6410
|
+
const getDouyinID = async (event, url, log = true) => {
|
|
6420
6411
|
const longLink = (await axios.get(url, { headers: { "User-Agent": "Apifox/1.0.0 (https://apifox.com)" } })).request.res.responseUrl;
|
|
6421
6412
|
let result = {};
|
|
6422
6413
|
switch (true) {
|
|
@@ -6473,7 +6464,7 @@ async function getDouyinID(event, url, log = true) {
|
|
|
6473
6464
|
}
|
|
6474
6465
|
log && console.log(result);
|
|
6475
6466
|
return result;
|
|
6476
|
-
}
|
|
6467
|
+
};
|
|
6477
6468
|
await init_module();
|
|
6478
6469
|
await init_Config();
|
|
6479
6470
|
var douyinBaseHeaders = {
|
|
@@ -6872,7 +6863,7 @@ var skipDynamic = async (PushItem) => {
|
|
|
6872
6863
|
return await douyinDBInstance.shouldFilter(PushItem, tags);
|
|
6873
6864
|
};
|
|
6874
6865
|
init_Config();
|
|
6875
|
-
async
|
|
6866
|
+
const kuaishouComments = async (data, emojidata) => {
|
|
6876
6867
|
let jsonArray = [];
|
|
6877
6868
|
for (const i of data.data.visionCommentList.rootComments) {
|
|
6878
6869
|
const cid = i.commentId;
|
|
@@ -6902,8 +6893,8 @@ async function kuaishouComments(data, emojidata) {
|
|
|
6902
6893
|
item1.text += " ";
|
|
6903
6894
|
}
|
|
6904
6895
|
return jsonArray.slice(0, Math.min(jsonArray.length, Config.kuaishou.numcomment));
|
|
6905
|
-
}
|
|
6906
|
-
|
|
6896
|
+
};
|
|
6897
|
+
var getRelativeTimeFromTimestamp$1 = (timestamp) => {
|
|
6907
6898
|
const timestampInSeconds = Math.floor(timestamp / 1e3);
|
|
6908
6899
|
const differenceInSeconds = Math.floor(Date.now() / 1e3) - timestampInSeconds;
|
|
6909
6900
|
if (differenceInSeconds < 30) return "刚刚";
|
|
@@ -6919,26 +6910,26 @@ function getRelativeTimeFromTimestamp$1(timestamp) {
|
|
|
6919
6910
|
const day = date.getDate().toString().padStart(2, "0");
|
|
6920
6911
|
return year + "-" + month + "-" + day;
|
|
6921
6912
|
}
|
|
6922
|
-
}
|
|
6923
|
-
|
|
6913
|
+
};
|
|
6914
|
+
const br = (data) => {
|
|
6924
6915
|
for (const i of data) {
|
|
6925
6916
|
let text = i.text;
|
|
6926
6917
|
text = text.replace(/\n/g, "<br>");
|
|
6927
6918
|
i.text = text;
|
|
6928
6919
|
}
|
|
6929
6920
|
return data;
|
|
6930
|
-
}
|
|
6931
|
-
|
|
6921
|
+
};
|
|
6922
|
+
const handling_at = (data) => {
|
|
6932
6923
|
for (const i of data) {
|
|
6933
6924
|
let text = i.text;
|
|
6934
6925
|
text = text.replace(/(@[\S\s]+?)\(\w+\)/g, (match, p1) => `<span style="color: rgb(3,72,141);">${p1.trim()}</span>`);
|
|
6935
6926
|
i.text = text;
|
|
6936
6927
|
}
|
|
6937
6928
|
return data;
|
|
6938
|
-
}
|
|
6929
|
+
};
|
|
6939
6930
|
init_default();
|
|
6940
6931
|
init_Config();
|
|
6941
|
-
async
|
|
6932
|
+
const fetchKuaishouData = async (type, opt) => {
|
|
6942
6933
|
const client = Client({
|
|
6943
6934
|
cookies: { kuaishou: Config.cookies.kuaishou },
|
|
6944
6935
|
request: {
|
|
@@ -6966,9 +6957,9 @@ async function fetchKuaishouData(type, opt) {
|
|
|
6966
6957
|
case "emoji_list": return await client.getKuaishouData("Emoji数据", { typeMode: "strict" });
|
|
6967
6958
|
default: break;
|
|
6968
6959
|
}
|
|
6969
|
-
}
|
|
6960
|
+
};
|
|
6970
6961
|
await init_module();
|
|
6971
|
-
async
|
|
6962
|
+
const getKuaishouID = async (url, log = true) => {
|
|
6972
6963
|
const longLink = await new Networks({ url }).getLongLink();
|
|
6973
6964
|
let result = {};
|
|
6974
6965
|
switch (true) {
|
|
@@ -6994,7 +6985,7 @@ async function getKuaishouID(url, log = true) {
|
|
|
6994
6985
|
}
|
|
6995
6986
|
log && console.log(result);
|
|
6996
6987
|
return result;
|
|
6997
|
-
}
|
|
6988
|
+
};
|
|
6998
6989
|
await init_module();
|
|
6999
6990
|
await init_Config();
|
|
7000
6991
|
var Kuaishou = class extends Base {
|
|
@@ -7430,7 +7421,7 @@ const setbilick = karin.command(/^#?(kkk)?s*设置s*(B站)ck$/i, async (e) => {
|
|
|
7430
7421
|
name: "kkk-ck管理",
|
|
7431
7422
|
event: "message.friend"
|
|
7432
7423
|
});
|
|
7433
|
-
async
|
|
7424
|
+
const removeAllFiles = async (dir) => {
|
|
7434
7425
|
const files = await fs.promises.readdir(dir);
|
|
7435
7426
|
for (const file of files) {
|
|
7436
7427
|
const filePath = path.join(dir, file);
|
|
@@ -7439,7 +7430,7 @@ async function removeAllFiles(dir) {
|
|
|
7439
7430
|
await fs.promises.rmdir(filePath);
|
|
7440
7431
|
} else await fs.promises.unlink(filePath);
|
|
7441
7432
|
}
|
|
7442
|
-
}
|
|
7433
|
+
};
|
|
7443
7434
|
await init_module();
|
|
7444
7435
|
await init_Config();
|
|
7445
7436
|
var HELP_MENU_CONFIG = [
|
|
@@ -7516,7 +7507,7 @@ var HELP_MENU_CONFIG = [
|
|
|
7516
7507
|
}]
|
|
7517
7508
|
}
|
|
7518
7509
|
];
|
|
7519
|
-
|
|
7510
|
+
var buildMenuForRole = (role) => {
|
|
7520
7511
|
const filterItems = (items = []) => items.filter((i) => !i.roles || i.roles.includes(role)).map(({ title, description, icon }) => ({
|
|
7521
7512
|
title,
|
|
7522
7513
|
description,
|
|
@@ -7534,7 +7525,7 @@ function buildMenuForRole(role) {
|
|
|
7534
7525
|
subGroups
|
|
7535
7526
|
};
|
|
7536
7527
|
}).filter((g) => g.items.length > 0 || g.subGroups && g.subGroups.length > 0);
|
|
7537
|
-
}
|
|
7528
|
+
};
|
|
7538
7529
|
const help = karin.command(/^#?kkk帮助$/, async (e) => {
|
|
7539
7530
|
const masters = config.master().filter((id) => id !== "console");
|
|
7540
7531
|
const role = !!e.sender && masters.includes(e.sender.userId) ? "master" : "member";
|
|
@@ -7626,14 +7617,14 @@ var LogCollector = class LogCollector {
|
|
|
7626
7617
|
};
|
|
7627
7618
|
await init_module();
|
|
7628
7619
|
await init_Config();
|
|
7629
|
-
|
|
7620
|
+
var statBotId = (pushlist) => {
|
|
7630
7621
|
const douyin$1 = pushlist.douyin?.[0]?.group_id?.[0]?.split(":")?.[1] || "";
|
|
7631
7622
|
const bilibili$1 = pushlist.bilibili?.[0]?.group_id?.[0]?.split(":")?.[1] || "";
|
|
7632
7623
|
return {
|
|
7633
7624
|
douyin: { botId: douyin$1 },
|
|
7634
7625
|
bilibili: { botId: bilibili$1 }
|
|
7635
7626
|
};
|
|
7636
|
-
}
|
|
7627
|
+
};
|
|
7637
7628
|
const wrapWithErrorHandler = (fn, options) => async (...args) => {
|
|
7638
7629
|
const logCollector = new LogCollector();
|
|
7639
7630
|
try {
|
|
@@ -7891,7 +7882,7 @@ const testDouyinPush = karin.command(/^#测试抖音推送\s*(https?:\/\/[^\s]+)
|
|
|
7891
7882
|
perm: Config.douyin.push.permission,
|
|
7892
7883
|
dsbAdapter: ["qqbot"]
|
|
7893
7884
|
});
|
|
7894
|
-
async
|
|
7885
|
+
const getXiaohongshuID = async (url, log = true) => {
|
|
7895
7886
|
const longLink = (await axios.get(url, { headers: { "User-Agent": "Apifox/1.0.0 (https://apifox.com)" } }))?.request?.res?.responseUrl ?? url;
|
|
7896
7887
|
const normalizedLink = (() => {
|
|
7897
7888
|
try {
|
|
@@ -7970,7 +7961,7 @@ async function getXiaohongshuID(url, log = true) {
|
|
|
7970
7961
|
if (result.type === "unknown") throw new Error("无法从链接中提取小红书笔记ID");
|
|
7971
7962
|
log && console.log(result);
|
|
7972
7963
|
return result;
|
|
7973
|
-
}
|
|
7964
|
+
};
|
|
7974
7965
|
init_Config();
|
|
7975
7966
|
var processCommentEmojis = (text, emojiData) => {
|
|
7976
7967
|
if (!text || !emojiData || !Array.isArray(emojiData)) return text;
|
|
@@ -7997,7 +7988,7 @@ var processAtUsers = (text, atUsers, useDarkTheme = false) => {
|
|
|
7997
7988
|
}
|
|
7998
7989
|
return processedText;
|
|
7999
7990
|
};
|
|
8000
|
-
|
|
7991
|
+
const getRelativeTimeFromTimestamp = (timestamp) => {
|
|
8001
7992
|
const now = Date.now();
|
|
8002
7993
|
const differenceInSeconds = Math.floor((now - timestamp) / 1e3);
|
|
8003
7994
|
if (differenceInSeconds < 30) return "刚刚";
|
|
@@ -8013,8 +8004,8 @@ function getRelativeTimeFromTimestamp(timestamp) {
|
|
|
8013
8004
|
const day = date.getDate().toString().padStart(2, "0");
|
|
8014
8005
|
return year + "-" + month + "-" + day;
|
|
8015
8006
|
}
|
|
8016
|
-
}
|
|
8017
|
-
async
|
|
8007
|
+
};
|
|
8008
|
+
const xiaohongshuComments = async (data, emojiData, useDarkTheme = false) => {
|
|
8018
8009
|
if (!data.data || !data.data.comments || data.data.comments.length === 0) return [];
|
|
8019
8010
|
const comments = [];
|
|
8020
8011
|
for (const comment of data.data.comments) {
|
|
@@ -8077,7 +8068,7 @@ async function xiaohongshuComments(data, emojiData, useDarkTheme = false) {
|
|
|
8077
8068
|
}
|
|
8078
8069
|
comments.sort((a, b) => Number(b.isTop) - Number(a.isTop));
|
|
8079
8070
|
return comments.slice(0, Config.xiaohongshu.numcomment);
|
|
8080
|
-
}
|
|
8071
|
+
};
|
|
8081
8072
|
await init_module();
|
|
8082
8073
|
await init_Config();
|
|
8083
8074
|
var Xiaohongshu = class extends Base {
|
|
@@ -8160,7 +8151,7 @@ var Xiaohongshu = class extends Base {
|
|
|
8160
8151
|
return true;
|
|
8161
8152
|
}
|
|
8162
8153
|
};
|
|
8163
|
-
|
|
8154
|
+
const xiaohongshuProcessVideos = (streamData, videoQuality, maxAutoVideoSize) => {
|
|
8164
8155
|
if (!streamData) {
|
|
8165
8156
|
logger.warn("没有找到视频流数据");
|
|
8166
8157
|
return null;
|
|
@@ -8250,7 +8241,7 @@ function xiaohongshuProcessVideos(streamData, videoQuality, maxAutoVideoSize) {
|
|
|
8250
8241
|
}
|
|
8251
8242
|
logger.warn("未找到任何匹配的画质,返回默认视频");
|
|
8252
8243
|
return allVideos[0];
|
|
8253
|
-
}
|
|
8244
|
+
};
|
|
8254
8245
|
const XiaohongshuEmoji = (data) => {
|
|
8255
8246
|
const ListArray = [];
|
|
8256
8247
|
if (data.data.data.emoji.tabs) {
|
|
@@ -8552,4 +8543,4 @@ const update = karin.task("kkk-更新检测", "*/10 * * * *", Handler, {
|
|
|
8552
8543
|
name: "kkk-更新检测",
|
|
8553
8544
|
log: false
|
|
8554
8545
|
});
|
|
8555
|
-
export {
|
|
8546
|
+
export { init_root as A, removeAllFiles as C, webConfig as D, task as E, web_config_default as O, dylogin as S, setdyck as T, setdyPush as _, bilibiliAPP as a, version as b, prefix as c, bilibiliPushList as d, changeBotID as f, setbiliPush as g, forcePush as h, update as i, Root as k, xiaohongshuAPP as l, douyinPushList as m, kkkUpdateCommand as n, douyinAPP as o, douyinPush as p, kkkUpdateTest as r, kuaishouAPP as s, kkkUpdate as t, bilibiliPush as u, testDouyinPush as v, setbilick as w, biLogin as x, help as y };
|
package/lib/index.js
CHANGED
package/lib/root.js
CHANGED
package/lib/web.config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./core_chunk/vendor-CQA9XE1g.js";
|
|
2
|
-
import { D as
|
|
2
|
+
import { D as webConfig, O as web_config_default } from "./core_chunk/main-DmgB1OAs.js";
|
|
3
3
|
import "./core_chunk/template-B47WClaw.js";
|
|
4
4
|
export { web_config_default as default, webConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{B as Ce,F as le,J as we,P as Z,R as $,U as q,V as Re,a as A,ct as se,o as fe,rt as Me,s as Ae,x as Ne}from"./index-lVzKXtN0.js";var ke=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Mt=we("check",ke),c=se(Me(),1),x=se(Re(),1),Te="Label",de=c.forwardRef((e,t)=>(0,x.jsx)(le.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));de.displayName=Te;var xe=de;function At({className:e,...t}){return(0,x.jsx)(xe,{"data-slot":"label",className:Ne("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Nt(e){const t=e+"CollectionProvider",[n,r]=Ce(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=o=>{const{scope:u,children:v}=o,g=c.useRef(null),h=c.useRef(new Map).current;return(0,x.jsx)(i,{scope:u,itemMap:h,collectionRef:g,children:v})};d.displayName=t;const a=e+"CollectionSlot",b=$(a),y=c.forwardRef((o,u)=>{const{scope:v,children:g}=o;return(0,x.jsx)(b,{ref:q(u,l(a,v).collectionRef),children:g})});y.displayName=a;const S=e+"CollectionItemSlot",s="data-radix-collection-item",m=$(S),p=c.forwardRef((o,u)=>{const{scope:v,children:g,...h}=o,f=c.useRef(null),C=q(u,f),w=l(S,v);return c.useEffect(()=>(w.itemMap.set(f,{ref:f,...h}),()=>void w.itemMap.delete(f))),(0,x.jsx)(m,{[s]:"",ref:C,children:g})});p.displayName=S;function E(o){const u=l(e+"CollectionConsumer",o);return c.useCallback(()=>{const v=u.collectionRef.current;if(!v)return[];const g=Array.from(v.querySelectorAll(`[${s}]`));return Array.from(u.itemMap.values()).sort((h,f)=>g.indexOf(h.ref.current)-g.indexOf(f.ref.current))},[u.collectionRef,u.itemMap])}return[{Provider:d,Slot:y,ItemSlot:p},E,r]}var Le=c.createContext(void 0);function kt(e){const t=c.useContext(Le);return e||t||"ltr"}var U=0;function Tt(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Q()),document.body.insertAdjacentElement("beforeend",e[1]??Q()),U++,()=>{U===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),U--}},[])}function Q(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var j="focusScope.autoFocusOnMount",K="focusScope.autoFocusOnUnmount",J={bubbles:!1,cancelable:!0},Pe="FocusScope",Ie=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...d}=e,[a,b]=c.useState(null),y=Z(i),S=Z(l),s=c.useRef(null),m=q(t,o=>b(o)),p=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let o=function(h){if(p.paused||!a)return;const f=h.target;a.contains(f)?s.current=f:M(s.current,{select:!0})},u=function(h){if(p.paused||!a)return;const f=h.relatedTarget;f!==null&&(a.contains(f)||M(s.current,{select:!0}))},v=function(h){if(document.activeElement===document.body)for(const f of h)f.removedNodes.length>0&&M(a)};document.addEventListener("focusin",o),document.addEventListener("focusout",u);const g=new MutationObserver(v);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",o),document.removeEventListener("focusout",u),g.disconnect()}}},[r,a,p.paused]),c.useEffect(()=>{if(a){te.add(p);const o=document.activeElement;if(!a.contains(o)){const u=new CustomEvent(j,J);a.addEventListener(j,y),a.dispatchEvent(u),u.defaultPrevented||(Fe(Be(ve(a)),{select:!0}),document.activeElement===o&&M(a))}return()=>{a.removeEventListener(j,y),setTimeout(()=>{const u=new CustomEvent(K,J);a.addEventListener(K,S),a.dispatchEvent(u),u.defaultPrevented||M(o??document.body,{select:!0}),a.removeEventListener(K,S),te.remove(p)},0)}}},[a,y,S,p]);const E=c.useCallback(o=>{if(!n&&!r||p.paused)return;const u=o.key==="Tab"&&!o.altKey&&!o.ctrlKey&&!o.metaKey,v=document.activeElement;if(u&&v){const g=o.currentTarget,[h,f]=_e(g);h&&f?!o.shiftKey&&v===f?(o.preventDefault(),n&&M(h,{select:!0})):o.shiftKey&&v===h&&(o.preventDefault(),n&&M(f,{select:!0})):v===g&&o.preventDefault()}},[n,r,p.paused]);return(0,x.jsx)(le.div,{tabIndex:-1,...d,ref:m,onKeyDown:E})});Ie.displayName=Pe;function Fe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(M(r,{select:t}),document.activeElement!==n)return}function _e(e){const t=ve(e);return[ee(t,e),ee(t.reverse(),e)]}function ve(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ee(e,t){for(const n of e)if(!Oe(n,{upTo:t}))return n}function Oe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function De(e){return e instanceof HTMLInputElement&&"select"in e}function M(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&De(e)&&t&&e.select()}}var te=We();function We(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ne(e,t),e.unshift(t)},remove(t){e=ne(e,t),e[0]?.resume()}}}function ne(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Be(e){return e.filter(t=>t.tagName!=="A")}var Ue=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},N=new WeakMap,I=new WeakMap,F={},V=0,me=function(e){return e&&(e.host||me(e.parentNode))},je=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=me(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ke=function(e,t,n,r){var i=je(t,Array.isArray(e)?e:[e]);F[n]||(F[n]=new WeakMap);var l=F[n],d=[],a=new Set,b=new Set(i),y=function(s){!s||a.has(s)||(a.add(s),y(s.parentNode))};i.forEach(y);var S=function(s){!s||b.has(s)||Array.prototype.forEach.call(s.children,function(m){if(a.has(m))S(m);else try{var p=m.getAttribute(r),E=p!==null&&p!=="false",o=(N.get(m)||0)+1,u=(l.get(m)||0)+1;N.set(m,o),l.set(m,u),d.push(m),o===1&&E&&I.set(m,!0),u===1&&m.setAttribute(n,"true"),E||m.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return S(t),a.clear(),V++,function(){d.forEach(function(s){var m=N.get(s)-1,p=l.get(s)-1;N.set(s,m),l.set(s,p),m||(I.has(s)||s.removeAttribute(r),I.delete(s)),p||s.removeAttribute(n)}),V--,V||(N=new WeakMap,N=new WeakMap,I=new WeakMap,F={})}},xt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ue(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),Ke(r,i,n,"aria-hidden")):function(){return null}},D="right-scroll-bar-position",W="width-before-scroll-bar",Ve="with-scroll-bars-hidden",Xe="--removed-body-scroll-bar-size";function X(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ye(e,t){var n=(0,c.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var He=typeof window<"u"?c.useLayoutEffect:c.useEffect,re=new WeakMap;function qe(e,t){var n=Ye(t||null,function(r){return e.forEach(function(i){return X(i,r)})});return He(function(){var r=re.get(n);if(r){var i=new Set(r),l=new Set(e),d=n.current;i.forEach(function(a){l.has(a)||X(a,null)}),l.forEach(function(a){i.has(a)||X(a,d)})}re.set(n,e)},[e]),n}function Ge(e){return e}function ze(e,t){t===void 0&&(t=Ge);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(d){return d!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(d){return i(d)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var d=n;n=[],d.forEach(i),l=n}var a=function(){var y=l;l=[],y.forEach(i)},b=function(){return Promise.resolve().then(a)};b(),n={push:function(y){l.push(y),b()},filter:function(y){return l=l.filter(y),n}}}}}function Ze(e){e===void 0&&(e={});var t=ze(null);return t.options=A({async:!0,ssr:!1},e),t}var he=function(e){var t=e.sideCar,n=fe(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,A({},n))};he.isSideCarExport=!0;function $e(e,t){return e.useMedium(t),he}var pe=Ze(),Y=function(){},B=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Y,onWheelCapture:Y,onTouchMoveCapture:Y}),i=r[0],l=r[1],d=e.forwardProps,a=e.children,b=e.className,y=e.removeScrollBar,S=e.enabled,s=e.shards,m=e.sideCar,p=e.noRelative,E=e.noIsolation,o=e.inert,u=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,h=e.gapMode,f=fe(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,w=qe([n,t]),R=A(A({},f),i);return c.createElement(c.Fragment,null,S&&c.createElement(C,{sideCar:pe,removeScrollBar:y,shards:s,noRelative:p,noIsolation:E,inert:o,setCallbacks:l,allowPinchZoom:!!u,lockRef:n,gapMode:h}),d?c.cloneElement(c.Children.only(a),A(A({},R),{ref:w})):c.createElement(g,A({},R,{className:b,ref:w}),a))});B.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};B.classNames={fullWidth:W,zeroRight:D};var oe,Qe=function(){if(oe)return oe;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Je(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Qe();return t&&e.setAttribute("nonce",t),e}function et(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function tt(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var nt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Je())&&(et(t,n),tt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},rt=function(){var e=nt();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ge=function(){var e=rt(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},ot={left:0,top:0,right:0,gap:0},H=function(e){return parseInt(e||"",10)||0},at=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[H(n),H(r),H(i)]},ct=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ot;var t=at(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},it=ge(),L="data-scroll-locked",ut=function(e,t,n,r){var i=e.left,l=e.top,d=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
1
|
+
import{B as Ce,F as le,J as we,P as Z,R as $,U as q,V as Re,a as A,ct as se,o as fe,rt as Me,s as Ae,x as Ne}from"./index-KepoosZz.js";var ke=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Mt=we("check",ke),c=se(Me(),1),x=se(Re(),1),Te="Label",de=c.forwardRef((e,t)=>(0,x.jsx)(le.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));de.displayName=Te;var xe=de;function At({className:e,...t}){return(0,x.jsx)(xe,{"data-slot":"label",className:Ne("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function Nt(e){const t=e+"CollectionProvider",[n,r]=Ce(t),[i,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=o=>{const{scope:u,children:v}=o,g=c.useRef(null),h=c.useRef(new Map).current;return(0,x.jsx)(i,{scope:u,itemMap:h,collectionRef:g,children:v})};d.displayName=t;const a=e+"CollectionSlot",b=$(a),y=c.forwardRef((o,u)=>{const{scope:v,children:g}=o;return(0,x.jsx)(b,{ref:q(u,l(a,v).collectionRef),children:g})});y.displayName=a;const S=e+"CollectionItemSlot",s="data-radix-collection-item",m=$(S),p=c.forwardRef((o,u)=>{const{scope:v,children:g,...h}=o,f=c.useRef(null),C=q(u,f),w=l(S,v);return c.useEffect(()=>(w.itemMap.set(f,{ref:f,...h}),()=>void w.itemMap.delete(f))),(0,x.jsx)(m,{[s]:"",ref:C,children:g})});p.displayName=S;function E(o){const u=l(e+"CollectionConsumer",o);return c.useCallback(()=>{const v=u.collectionRef.current;if(!v)return[];const g=Array.from(v.querySelectorAll(`[${s}]`));return Array.from(u.itemMap.values()).sort((h,f)=>g.indexOf(h.ref.current)-g.indexOf(f.ref.current))},[u.collectionRef,u.itemMap])}return[{Provider:d,Slot:y,ItemSlot:p},E,r]}var Le=c.createContext(void 0);function kt(e){const t=c.useContext(Le);return e||t||"ltr"}var U=0;function Tt(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Q()),document.body.insertAdjacentElement("beforeend",e[1]??Q()),U++,()=>{U===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),U--}},[])}function Q(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var j="focusScope.autoFocusOnMount",K="focusScope.autoFocusOnUnmount",J={bubbles:!1,cancelable:!0},Pe="FocusScope",Ie=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...d}=e,[a,b]=c.useState(null),y=Z(i),S=Z(l),s=c.useRef(null),m=q(t,o=>b(o)),p=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let o=function(h){if(p.paused||!a)return;const f=h.target;a.contains(f)?s.current=f:M(s.current,{select:!0})},u=function(h){if(p.paused||!a)return;const f=h.relatedTarget;f!==null&&(a.contains(f)||M(s.current,{select:!0}))},v=function(h){if(document.activeElement===document.body)for(const f of h)f.removedNodes.length>0&&M(a)};document.addEventListener("focusin",o),document.addEventListener("focusout",u);const g=new MutationObserver(v);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",o),document.removeEventListener("focusout",u),g.disconnect()}}},[r,a,p.paused]),c.useEffect(()=>{if(a){te.add(p);const o=document.activeElement;if(!a.contains(o)){const u=new CustomEvent(j,J);a.addEventListener(j,y),a.dispatchEvent(u),u.defaultPrevented||(Fe(Be(ve(a)),{select:!0}),document.activeElement===o&&M(a))}return()=>{a.removeEventListener(j,y),setTimeout(()=>{const u=new CustomEvent(K,J);a.addEventListener(K,S),a.dispatchEvent(u),u.defaultPrevented||M(o??document.body,{select:!0}),a.removeEventListener(K,S),te.remove(p)},0)}}},[a,y,S,p]);const E=c.useCallback(o=>{if(!n&&!r||p.paused)return;const u=o.key==="Tab"&&!o.altKey&&!o.ctrlKey&&!o.metaKey,v=document.activeElement;if(u&&v){const g=o.currentTarget,[h,f]=_e(g);h&&f?!o.shiftKey&&v===f?(o.preventDefault(),n&&M(h,{select:!0})):o.shiftKey&&v===h&&(o.preventDefault(),n&&M(f,{select:!0})):v===g&&o.preventDefault()}},[n,r,p.paused]);return(0,x.jsx)(le.div,{tabIndex:-1,...d,ref:m,onKeyDown:E})});Ie.displayName=Pe;function Fe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(M(r,{select:t}),document.activeElement!==n)return}function _e(e){const t=ve(e);return[ee(t,e),ee(t.reverse(),e)]}function ve(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ee(e,t){for(const n of e)if(!Oe(n,{upTo:t}))return n}function Oe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function De(e){return e instanceof HTMLInputElement&&"select"in e}function M(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&De(e)&&t&&e.select()}}var te=We();function We(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ne(e,t),e.unshift(t)},remove(t){e=ne(e,t),e[0]?.resume()}}}function ne(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Be(e){return e.filter(t=>t.tagName!=="A")}var Ue=function(e){return typeof document>"u"?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},N=new WeakMap,I=new WeakMap,F={},V=0,me=function(e){return e&&(e.host||me(e.parentNode))},je=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=me(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ke=function(e,t,n,r){var i=je(t,Array.isArray(e)?e:[e]);F[n]||(F[n]=new WeakMap);var l=F[n],d=[],a=new Set,b=new Set(i),y=function(s){!s||a.has(s)||(a.add(s),y(s.parentNode))};i.forEach(y);var S=function(s){!s||b.has(s)||Array.prototype.forEach.call(s.children,function(m){if(a.has(m))S(m);else try{var p=m.getAttribute(r),E=p!==null&&p!=="false",o=(N.get(m)||0)+1,u=(l.get(m)||0)+1;N.set(m,o),l.set(m,u),d.push(m),o===1&&E&&I.set(m,!0),u===1&&m.setAttribute(n,"true"),E||m.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return S(t),a.clear(),V++,function(){d.forEach(function(s){var m=N.get(s)-1,p=l.get(s)-1;N.set(s,m),l.set(s,p),m||(I.has(s)||s.removeAttribute(r),I.delete(s)),p||s.removeAttribute(n)}),V--,V||(N=new WeakMap,N=new WeakMap,I=new WeakMap,F={})}},xt=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Ue(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),Ke(r,i,n,"aria-hidden")):function(){return null}},D="right-scroll-bar-position",W="width-before-scroll-bar",Ve="with-scroll-bars-hidden",Xe="--removed-body-scroll-bar-size";function X(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ye(e,t){var n=(0,c.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var He=typeof window<"u"?c.useLayoutEffect:c.useEffect,re=new WeakMap;function qe(e,t){var n=Ye(t||null,function(r){return e.forEach(function(i){return X(i,r)})});return He(function(){var r=re.get(n);if(r){var i=new Set(r),l=new Set(e),d=n.current;i.forEach(function(a){l.has(a)||X(a,null)}),l.forEach(function(a){i.has(a)||X(a,d)})}re.set(n,e)},[e]),n}function Ge(e){return e}function ze(e,t){t===void 0&&(t=Ge);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(d){return d!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(d){return i(d)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var d=n;n=[],d.forEach(i),l=n}var a=function(){var y=l;l=[],y.forEach(i)},b=function(){return Promise.resolve().then(a)};b(),n={push:function(y){l.push(y),b()},filter:function(y){return l=l.filter(y),n}}}}}function Ze(e){e===void 0&&(e={});var t=ze(null);return t.options=A({async:!0,ssr:!1},e),t}var he=function(e){var t=e.sideCar,n=fe(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return c.createElement(r,A({},n))};he.isSideCarExport=!0;function $e(e,t){return e.useMedium(t),he}var pe=Ze(),Y=function(){},B=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Y,onWheelCapture:Y,onTouchMoveCapture:Y}),i=r[0],l=r[1],d=e.forwardProps,a=e.children,b=e.className,y=e.removeScrollBar,S=e.enabled,s=e.shards,m=e.sideCar,p=e.noRelative,E=e.noIsolation,o=e.inert,u=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,h=e.gapMode,f=fe(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=m,w=qe([n,t]),R=A(A({},f),i);return c.createElement(c.Fragment,null,S&&c.createElement(C,{sideCar:pe,removeScrollBar:y,shards:s,noRelative:p,noIsolation:E,inert:o,setCallbacks:l,allowPinchZoom:!!u,lockRef:n,gapMode:h}),d?c.cloneElement(c.Children.only(a),A(A({},R),{ref:w})):c.createElement(g,A({},R,{className:b,ref:w}),a))});B.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};B.classNames={fullWidth:W,zeroRight:D};var oe,Qe=function(){if(oe)return oe;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Je(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Qe();return t&&e.setAttribute("nonce",t),e}function et(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function tt(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}var nt=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Je())&&(et(t,n),tt(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},rt=function(){var e=nt();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ge=function(){var e=rt(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},ot={left:0,top:0,right:0,gap:0},H=function(e){return parseInt(e||"",10)||0},at=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[H(n),H(r),H(i)]},ct=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ot;var t=at(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},it=ge(),L="data-scroll-locked",ut=function(e,t,n,r){var i=e.left,l=e.top,d=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
2
2
|
.`.concat(Ve,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(a,"px ").concat(r,`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as F,F as y,M as A,P as q,V as P,ct as E,it as j,rt as I,x as h}from"./index-
|
|
1
|
+
import{B as F,F as y,M as A,P as q,V as P,ct as E,it as j,rt as I,x as h}from"./index-KepoosZz.js";var V=j({"../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js":(t=>{var e=I();function o(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var n=typeof Object.is=="function"?Object.is:o,u=e.useState,a=e.useEffect,v=e.useLayoutEffect,i=e.useDebugValue;function c(r,s){var m=s(),g=u({inst:{value:m,getSnapshot:s}}),l=g[0].inst,x=g[1];return v(function(){l.value=m,l.getSnapshot=s,d(l)&&x({inst:l})},[r,m,s]),a(function(){return d(l)&&x({inst:l}),r(function(){d(l)&&x({inst:l})})},[r]),i(m),m}function d(r){var s=r.getSnapshot;r=r.value;try{var m=s();return!n(r,m)}catch{return!0}}function S(r,s){return s()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S:c;t.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_})}),$=j({"../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.0/node_modules/use-sync-external-store/shim/index.js":((t,e)=>{e.exports=V()})}),z=E($(),1);function T(){return(0,z.useSyncExternalStore)(B,()=>!0,()=>!1)}function B(){return()=>{}}var f=E(I(),1),p=E(P(),1),L="Avatar",[D,W]=F(L),[G,b]=D(L),C=f.forwardRef((t,e)=>{const{__scopeAvatar:o,...n}=t,[u,a]=f.useState("idle");return(0,p.jsx)(G,{scope:o,imageLoadingStatus:u,onImageLoadingStatusChange:a,children:(0,p.jsx)(y.span,{...n,ref:e})})});C.displayName=L;var R="AvatarImage",k=f.forwardRef((t,e)=>{const{__scopeAvatar:o,src:n,onLoadingStatusChange:u=()=>{},...a}=t,v=b(R,o),i=H(n,a),c=q(d=>{u(d),v.onImageLoadingStatusChange(d)});return A(()=>{i!=="idle"&&c(i)},[i,c]),i==="loaded"?(0,p.jsx)(y.img,{...a,ref:e,src:n}):null});k.displayName=R;var N="AvatarFallback",M=f.forwardRef((t,e)=>{const{__scopeAvatar:o,delayMs:n,...u}=t,a=b(N,o),[v,i]=f.useState(n===void 0);return f.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>i(!0),n);return()=>window.clearTimeout(c)}},[n]),v&&a.imageLoadingStatus!=="loaded"?(0,p.jsx)(y.span,{...u,ref:e}):null});M.displayName=N;function w(t,e){return t?e?(t.src!==e&&(t.src=e),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function H(t,{referrerPolicy:e,crossOrigin:o}){const n=T(),u=f.useRef(null),a=n?(u.current||(u.current=new window.Image),u.current):null,[v,i]=f.useState(()=>w(a,t));return A(()=>{i(w(a,t))},[a,t]),A(()=>{const c=_=>()=>{i(_)};if(!a)return;const d=c("loaded"),S=c("error");return a.addEventListener("load",d),a.addEventListener("error",S),e&&(a.referrerPolicy=e),typeof o=="string"&&(a.crossOrigin=o),()=>{a.removeEventListener("load",d),a.removeEventListener("error",S)}},[a,o,e]),v}var J=C,K=k,O=M;function Q({className:t,...e}){return(0,p.jsx)(J,{"data-slot":"avatar",className:h("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...e})}function X({className:t,...e}){return(0,p.jsx)(K,{"data-slot":"avatar-image",className:h("aspect-square size-full",t),...e})}function Y({className:t,...e}){return(0,p.jsx)(O,{"data-slot":"avatar-fallback",className:h("bg-muted flex size-full items-center justify-center rounded-full",t),...e})}export{Y as n,X as r,Q as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as s,Q as r,X as o,Y as e,Z as i}from"./index-
|
|
1
|
+
import{$ as s,Q as r,X as o,Y as e,Z as i}from"./index-KepoosZz.js";export{e as Resource,o as SERIALIZE_TO_IPC_FN,i as invoke,r as isTauri,s as transformCallback};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as e}from"./index-
|
|
1
|
+
import{J as e}from"./index-KepoosZz.js";var c=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],a=e("eye",c);export{a as t};
|