@cxyhhhhh/openclaw-qqbot 2.0.0-dev.202607081544 → 2.0.0-dev.202607081614
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/dist/index.cjs +61 -823
- package/dist/index.cjs.map +1 -1
- package/index.ts +2 -2
- package/openclaw.plugin.json +2 -2
- package/package.json +4 -3
- package/skills/qqbot-channel/SKILL.md +2 -2
- package/src/tools/channel.ts +148 -0
- package/skills/qqbot-group/SKILL.md +0 -75
- package/skills/qqbot-group/references/api_reference.md +0 -94
- package/src/tools/platform.ts +0 -149
package/dist/index.cjs
CHANGED
|
@@ -6,9 +6,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
7
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __esm = (fn, res) => function __init() {
|
|
10
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
11
|
-
};
|
|
12
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
13
10
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
14
11
|
};
|
|
@@ -4736,764 +4733,6 @@ var require_main = __commonJS({
|
|
|
4736
4733
|
}
|
|
4737
4734
|
});
|
|
4738
4735
|
|
|
4739
|
-
// node_modules/silk-wasm/lib/index.mjs
|
|
4740
|
-
var lib_exports = {};
|
|
4741
|
-
__export(lib_exports, {
|
|
4742
|
-
decode: () => decode,
|
|
4743
|
-
encode: () => encode,
|
|
4744
|
-
getDuration: () => getDuration,
|
|
4745
|
-
getWavFileInfo: () => getWavFileInfo2,
|
|
4746
|
-
isSilk: () => isSilk,
|
|
4747
|
-
isWav: () => isWav
|
|
4748
|
-
});
|
|
4749
|
-
function isWavFile(fileData) {
|
|
4750
|
-
try {
|
|
4751
|
-
let chunks = unpackWavFileChunks(fileData), fmt = decodeFormatChunk(chunks.get("fmt")), data = chunks.get("data");
|
|
4752
|
-
return getWavFileType(fmt), verifyDataChunkLength(data, fmt), true;
|
|
4753
|
-
} catch {
|
|
4754
|
-
return false;
|
|
4755
|
-
}
|
|
4756
|
-
}
|
|
4757
|
-
function decodeWavFile(fileData) {
|
|
4758
|
-
let chunks = unpackWavFileChunks(fileData), fmt = decodeFormatChunk(chunks.get("fmt")), data = chunks.get("data"), wavFileType = getWavFileType(fmt), audioEncoding = wavFileTypeAudioEncodings[wavFileType], wavFileTypeName = audioEncodingNames[audioEncoding] + fmt.bitsPerSample;
|
|
4759
|
-
return verifyDataChunkLength(data, fmt), { channelData: decodeDataChunk(data, fmt, wavFileType), sampleRate: fmt.sampleRate, numberOfChannels: fmt.numberOfChannels, audioEncoding, bitsPerSample: fmt.bitsPerSample, wavFileTypeName };
|
|
4760
|
-
}
|
|
4761
|
-
function unpackWavFileChunks(fileData) {
|
|
4762
|
-
let dataView;
|
|
4763
|
-
fileData instanceof ArrayBuffer ? dataView = new DataView(fileData) : dataView = new DataView(fileData.buffer, fileData.byteOffset, fileData.byteLength);
|
|
4764
|
-
let fileLength = dataView.byteLength;
|
|
4765
|
-
if (fileLength < 20) throw new Error("WAV file is too short.");
|
|
4766
|
-
if (getString(dataView, 0, 4) != "RIFF") throw new Error("Not a valid WAV file (no RIFF header).");
|
|
4767
|
-
let mainChunkLength = dataView.getUint32(4, true);
|
|
4768
|
-
if (8 + mainChunkLength != fileLength) throw new Error(`Main chunk length of WAV file (${8 + mainChunkLength}) does not match file size (${fileLength}).`);
|
|
4769
|
-
if (getString(dataView, 8, 4) != "WAVE") throw new Error("RIFF file is not a WAV file.");
|
|
4770
|
-
let chunks = /* @__PURE__ */ new Map(), fileOffset = 12;
|
|
4771
|
-
for (; fileOffset < fileLength; ) {
|
|
4772
|
-
if (fileOffset + 8 > fileLength) throw new Error(`Incomplete chunk prefix in WAV file at offset ${fileOffset}.`);
|
|
4773
|
-
let chunkId = getString(dataView, fileOffset, 4).trim(), chunkLength = dataView.getUint32(fileOffset + 4, true);
|
|
4774
|
-
if (fileOffset + 8 + chunkLength > fileLength) throw new Error(`Incomplete chunk data in WAV file at offset ${fileOffset}.`);
|
|
4775
|
-
let chunkData = new DataView(dataView.buffer, dataView.byteOffset + fileOffset + 8, chunkLength);
|
|
4776
|
-
chunks.set(chunkId, chunkData);
|
|
4777
|
-
let padLength = chunkLength % 2;
|
|
4778
|
-
fileOffset += 8 + chunkLength + padLength;
|
|
4779
|
-
}
|
|
4780
|
-
return chunks;
|
|
4781
|
-
}
|
|
4782
|
-
function getString(dataView, offset, length) {
|
|
4783
|
-
let a = new Uint8Array(dataView.buffer, dataView.byteOffset + offset, length);
|
|
4784
|
-
return String.fromCharCode.apply(null, a);
|
|
4785
|
-
}
|
|
4786
|
-
function getInt24(dataView, offset) {
|
|
4787
|
-
let b0 = dataView.getInt8(offset + 2) * 65536, b12 = dataView.getUint16(offset, true);
|
|
4788
|
-
return b0 + b12;
|
|
4789
|
-
}
|
|
4790
|
-
function decodeFormatChunk(dataView) {
|
|
4791
|
-
if (!dataView) throw new Error("No format chunk found in WAV file.");
|
|
4792
|
-
if (dataView.byteLength < 16) throw new Error("Format chunk of WAV file is too short.");
|
|
4793
|
-
let fmt = {};
|
|
4794
|
-
return fmt.formatCode = dataView.getUint16(0, true), fmt.numberOfChannels = dataView.getUint16(2, true), fmt.sampleRate = dataView.getUint32(4, true), fmt.bytesPerSec = dataView.getUint32(8, true), fmt.bytesPerFrame = dataView.getUint16(12, true), fmt.bitsPerSample = dataView.getUint16(14, true), fmt;
|
|
4795
|
-
}
|
|
4796
|
-
function getWavFileType(fmt) {
|
|
4797
|
-
if (fmt.numberOfChannels < 1 || fmt.numberOfChannels > 999) throw new Error("Invalid number of channels in WAV file.");
|
|
4798
|
-
let bytesPerSample = Math.ceil(fmt.bitsPerSample / 8), expectedBytesPerFrame = fmt.numberOfChannels * bytesPerSample;
|
|
4799
|
-
if (fmt.formatCode == 1 && fmt.bitsPerSample >= 1 && fmt.bitsPerSample <= 8 && fmt.bytesPerFrame == expectedBytesPerFrame) return 0;
|
|
4800
|
-
if (fmt.formatCode == 1 && fmt.bitsPerSample >= 9 && fmt.bitsPerSample <= 16 && fmt.bytesPerFrame == expectedBytesPerFrame) return 1;
|
|
4801
|
-
if (fmt.formatCode == 1 && fmt.bitsPerSample >= 17 && fmt.bitsPerSample <= 24 && fmt.bytesPerFrame == expectedBytesPerFrame) return 2;
|
|
4802
|
-
if (fmt.formatCode == 3 && fmt.bitsPerSample == 32 && fmt.bytesPerFrame == expectedBytesPerFrame) return 3;
|
|
4803
|
-
throw new Error(`Unsupported WAV file type, formatCode=${fmt.formatCode}, bitsPerSample=${fmt.bitsPerSample}, bytesPerFrame=${fmt.bytesPerFrame}, numberOfChannels=${fmt.numberOfChannels}.`);
|
|
4804
|
-
}
|
|
4805
|
-
function decodeDataChunk(data, fmt, wavFileType) {
|
|
4806
|
-
switch (wavFileType) {
|
|
4807
|
-
case 0:
|
|
4808
|
-
return decodeDataChunk_uint8(data, fmt);
|
|
4809
|
-
case 1:
|
|
4810
|
-
return decodeDataChunk_int16(data, fmt);
|
|
4811
|
-
case 2:
|
|
4812
|
-
return decodeDataChunk_int24(data, fmt);
|
|
4813
|
-
case 3:
|
|
4814
|
-
return decodeDataChunk_float32(data, fmt);
|
|
4815
|
-
default:
|
|
4816
|
-
throw new Error("No decoder.");
|
|
4817
|
-
}
|
|
4818
|
-
}
|
|
4819
|
-
function decodeDataChunk_int16(data, fmt) {
|
|
4820
|
-
let channelData = allocateChannelDataArrays(data.byteLength, fmt), numberOfChannels = fmt.numberOfChannels, numberOfFrames = channelData[0].length, offs = 0;
|
|
4821
|
-
for (let frameNo = 0; frameNo < numberOfFrames; frameNo++) for (let channelNo = 0; channelNo < numberOfChannels; channelNo++) {
|
|
4822
|
-
let sampleValueFloat = data.getInt16(offs, true) / 32768;
|
|
4823
|
-
channelData[channelNo][frameNo] = sampleValueFloat, offs += 2;
|
|
4824
|
-
}
|
|
4825
|
-
return channelData;
|
|
4826
|
-
}
|
|
4827
|
-
function decodeDataChunk_uint8(data, fmt) {
|
|
4828
|
-
let channelData = allocateChannelDataArrays(data.byteLength, fmt), numberOfChannels = fmt.numberOfChannels, numberOfFrames = channelData[0].length, offs = 0;
|
|
4829
|
-
for (let frameNo = 0; frameNo < numberOfFrames; frameNo++) for (let channelNo = 0; channelNo < numberOfChannels; channelNo++) {
|
|
4830
|
-
let sampleValueFloat = (data.getUint8(offs) - 128) / 128;
|
|
4831
|
-
channelData[channelNo][frameNo] = sampleValueFloat, offs += 1;
|
|
4832
|
-
}
|
|
4833
|
-
return channelData;
|
|
4834
|
-
}
|
|
4835
|
-
function decodeDataChunk_int24(data, fmt) {
|
|
4836
|
-
let channelData = allocateChannelDataArrays(data.byteLength, fmt), numberOfChannels = fmt.numberOfChannels, numberOfFrames = channelData[0].length, offs = 0;
|
|
4837
|
-
for (let frameNo = 0; frameNo < numberOfFrames; frameNo++) for (let channelNo = 0; channelNo < numberOfChannels; channelNo++) {
|
|
4838
|
-
let sampleValueFloat = getInt24(data, offs) / 8388608;
|
|
4839
|
-
channelData[channelNo][frameNo] = sampleValueFloat, offs += 3;
|
|
4840
|
-
}
|
|
4841
|
-
return channelData;
|
|
4842
|
-
}
|
|
4843
|
-
function decodeDataChunk_float32(data, fmt) {
|
|
4844
|
-
let channelData = allocateChannelDataArrays(data.byteLength, fmt), numberOfChannels = fmt.numberOfChannels, numberOfFrames = channelData[0].length, offs = 0;
|
|
4845
|
-
for (let frameNo = 0; frameNo < numberOfFrames; frameNo++) for (let channelNo = 0; channelNo < numberOfChannels; channelNo++) {
|
|
4846
|
-
let sampleValueFloat = data.getFloat32(offs, true);
|
|
4847
|
-
channelData[channelNo][frameNo] = sampleValueFloat, offs += 4;
|
|
4848
|
-
}
|
|
4849
|
-
return channelData;
|
|
4850
|
-
}
|
|
4851
|
-
function allocateChannelDataArrays(dataLength, fmt) {
|
|
4852
|
-
let numberOfFrames = Math.floor(dataLength / fmt.bytesPerFrame), channelData = new Array(fmt.numberOfChannels);
|
|
4853
|
-
for (let channelNo = 0; channelNo < fmt.numberOfChannels; channelNo++) channelData[channelNo] = new Float32Array(numberOfFrames);
|
|
4854
|
-
return channelData;
|
|
4855
|
-
}
|
|
4856
|
-
function verifyDataChunkLength(data, fmt) {
|
|
4857
|
-
if (!data) throw new Error("No data chunk found in WAV file.");
|
|
4858
|
-
if (data.byteLength % fmt.bytesPerFrame != 0) throw new Error("WAV file data chunk length is not a multiple of frame size.");
|
|
4859
|
-
}
|
|
4860
|
-
function getWavFileInfo(fileData) {
|
|
4861
|
-
let chunks = unpackWavFileChunks(fileData), chunkInfo = getChunkInfo(chunks), fmt = decodeFormatChunk(chunks.get("fmt"));
|
|
4862
|
-
return { chunkInfo, fmt };
|
|
4863
|
-
}
|
|
4864
|
-
function getChunkInfo(chunks) {
|
|
4865
|
-
let chunkInfo = [];
|
|
4866
|
-
for (let e of chunks) {
|
|
4867
|
-
let ci = {};
|
|
4868
|
-
ci.chunkId = e[0], ci.dataOffset = e[1].byteOffset, ci.dataLength = e[1].byteLength, chunkInfo.push(ci);
|
|
4869
|
-
}
|
|
4870
|
-
return chunkInfo.sort((e1, e2) => e1.dataOffset - e2.dataOffset), chunkInfo;
|
|
4871
|
-
}
|
|
4872
|
-
function ensureMonoPcm(channelData) {
|
|
4873
|
-
let { length: numberOfChannels } = channelData;
|
|
4874
|
-
if (numberOfChannels === 1) return channelData[0];
|
|
4875
|
-
let monoData = new Float32Array(channelData[0].length);
|
|
4876
|
-
for (let i = 0; i < monoData.length; i++) {
|
|
4877
|
-
let sum = 0;
|
|
4878
|
-
for (let j = 0; j < numberOfChannels; j++) sum += channelData[j][i];
|
|
4879
|
-
monoData[i] = sum / numberOfChannels;
|
|
4880
|
-
}
|
|
4881
|
-
return monoData;
|
|
4882
|
-
}
|
|
4883
|
-
function ensureS16lePcm(input) {
|
|
4884
|
-
let int16Array = new Int16Array(input.length);
|
|
4885
|
-
for (let offset = 0; offset < input.length; offset++) {
|
|
4886
|
-
let x = ~~(input[offset] * 32768);
|
|
4887
|
-
int16Array[offset] = x > 32767 ? 32767 : x;
|
|
4888
|
-
}
|
|
4889
|
-
return int16Array.buffer;
|
|
4890
|
-
}
|
|
4891
|
-
function toUTF8String(input, start = 0, end = input.byteLength) {
|
|
4892
|
-
return new TextDecoder().decode(input.slice(start, end));
|
|
4893
|
-
}
|
|
4894
|
-
function binaryFromSource(source) {
|
|
4895
|
-
return ArrayBuffer.isView(source) ? source.buffer.slice(source.byteOffset, source.byteOffset + source.byteLength) : source;
|
|
4896
|
-
}
|
|
4897
|
-
async function encode(input, sampleRate) {
|
|
4898
|
-
let instance = await silk_default(), buffer = binaryFromSource(input);
|
|
4899
|
-
if (!buffer?.byteLength) throw new Error("input data length is 0");
|
|
4900
|
-
if (isWavFile(input)) {
|
|
4901
|
-
let { channelData, sampleRate: wavSampleRate } = decodeWavFile(input);
|
|
4902
|
-
sampleRate ||= wavSampleRate, buffer = ensureS16lePcm(ensureMonoPcm(channelData));
|
|
4903
|
-
}
|
|
4904
|
-
let data = new Uint8Array(), duration = instance.silk_encode(buffer, sampleRate, (output) => {
|
|
4905
|
-
data = output.slice();
|
|
4906
|
-
});
|
|
4907
|
-
if (duration === 0) throw new Error("silk encoding failure");
|
|
4908
|
-
return { data, duration };
|
|
4909
|
-
}
|
|
4910
|
-
async function decode(input, sampleRate) {
|
|
4911
|
-
let instance = await silk_default(), buffer = binaryFromSource(input);
|
|
4912
|
-
if (!buffer?.byteLength) throw new Error("input data length is 0");
|
|
4913
|
-
let data = new Uint8Array(), duration = instance.silk_decode(buffer, sampleRate, (output) => {
|
|
4914
|
-
output.length > 0 && (data = output.slice());
|
|
4915
|
-
});
|
|
4916
|
-
if (duration === 0) throw new Error("silk decoding failure");
|
|
4917
|
-
return { data, duration };
|
|
4918
|
-
}
|
|
4919
|
-
function getDuration(data, frameMs = 20) {
|
|
4920
|
-
let buffer = binaryFromSource(data), view = new DataView(buffer), byteLength = view.byteLength, offset = view.getUint8(0) === 2 ? 10 : 9, blocks = 0;
|
|
4921
|
-
for (; offset < byteLength; ) {
|
|
4922
|
-
let size = view.getUint16(offset, true);
|
|
4923
|
-
blocks += 1, offset += size + 2;
|
|
4924
|
-
}
|
|
4925
|
-
return blocks * frameMs;
|
|
4926
|
-
}
|
|
4927
|
-
function isWav(data) {
|
|
4928
|
-
return isWavFile(data);
|
|
4929
|
-
}
|
|
4930
|
-
function getWavFileInfo2(data) {
|
|
4931
|
-
return getWavFileInfo(data);
|
|
4932
|
-
}
|
|
4933
|
-
function isSilk(data) {
|
|
4934
|
-
let buffer = binaryFromSource(data);
|
|
4935
|
-
return buffer.byteLength < 7 ? false : toUTF8String(buffer, 0, 7).includes("#!SILK");
|
|
4936
|
-
}
|
|
4937
|
-
var import_meta, Module, silk_default, audioEncodingNames, wavFileTypeAudioEncodings;
|
|
4938
|
-
var init_lib = __esm({
|
|
4939
|
-
"node_modules/silk-wasm/lib/index.mjs"() {
|
|
4940
|
-
"use strict";
|
|
4941
|
-
import_meta = {};
|
|
4942
|
-
Module = async function(moduleArg = {}) {
|
|
4943
|
-
var moduleRtn, g2 = moduleArg, aa, q, ba = new Promise((a, b2) => {
|
|
4944
|
-
aa = a, q = b2;
|
|
4945
|
-
}), ca = typeof window == "object", da = typeof WorkerGlobalScope < "u", t = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && process.type != "renderer";
|
|
4946
|
-
if (t) {
|
|
4947
|
-
let { createRequire: a } = await import("module");
|
|
4948
|
-
var require2 = a(import_meta.url);
|
|
4949
|
-
}
|
|
4950
|
-
var u2 = (a, b2) => {
|
|
4951
|
-
throw b2;
|
|
4952
|
-
}, ea = import_meta.url, v = "", fa, w2;
|
|
4953
|
-
if (t) {
|
|
4954
|
-
var fs20 = require2("fs"), ha = require2("path");
|
|
4955
|
-
ea.startsWith("file:") && (v = ha.dirname(require2("url").fileURLToPath(ea)) + "/"), w2 = (a) => (a = y2(a) ? new URL(a) : a, fs20.readFileSync(a)), fa = async (a) => (a = y2(a) ? new URL(a) : a, fs20.readFileSync(a, void 0)), process.argv.slice(2), u2 = (a, b2) => {
|
|
4956
|
-
throw process.exitCode = a, b2;
|
|
4957
|
-
};
|
|
4958
|
-
} else if (ca || da) {
|
|
4959
|
-
try {
|
|
4960
|
-
v = new URL(".", ea).href;
|
|
4961
|
-
} catch {
|
|
4962
|
-
}
|
|
4963
|
-
da && (w2 = (a) => {
|
|
4964
|
-
var b2 = new XMLHttpRequest();
|
|
4965
|
-
return b2.open("GET", a, false), b2.responseType = "arraybuffer", b2.send(null), new Uint8Array(b2.response);
|
|
4966
|
-
}), fa = async (a) => {
|
|
4967
|
-
if (y2(a)) return new Promise((d3, c) => {
|
|
4968
|
-
var e = new XMLHttpRequest();
|
|
4969
|
-
e.open("GET", a, true), e.responseType = "arraybuffer", e.onload = () => {
|
|
4970
|
-
e.status == 200 || e.status == 0 && e.response ? d3(e.response) : c(e.status);
|
|
4971
|
-
}, e.onerror = c, e.send(null);
|
|
4972
|
-
});
|
|
4973
|
-
var b2 = await fetch(a, { credentials: "same-origin" });
|
|
4974
|
-
if (b2.ok) return b2.arrayBuffer();
|
|
4975
|
-
throw Error(b2.status + " : " + b2.url);
|
|
4976
|
-
};
|
|
4977
|
-
}
|
|
4978
|
-
console.log.bind(console);
|
|
4979
|
-
var A = console.error.bind(console), C2, D, E3 = false, ia, ja, F2, G, H, I, J, ka, la, ma, na, y2 = (a) => a.startsWith("file://");
|
|
4980
|
-
function pa() {
|
|
4981
|
-
var a = D.buffer;
|
|
4982
|
-
ja = new Int8Array(a), G = new Int16Array(a), F2 = new Uint8Array(a), H = new Uint16Array(a), I = new Int32Array(a), J = new Uint32Array(a), ka = new Float32Array(a), na = new Float64Array(a), la = new BigInt64Array(a), ma = new BigUint64Array(a);
|
|
4983
|
-
}
|
|
4984
|
-
var K = 0, L = null;
|
|
4985
|
-
function qa(a) {
|
|
4986
|
-
throw g2.onAbort?.(a), a = "Aborted(" + a + ")", A(a), E3 = true, a = new WebAssembly.RuntimeError(a + ". Build with -sASSERTIONS for more info."), q(a), a;
|
|
4987
|
-
}
|
|
4988
|
-
var ra;
|
|
4989
|
-
async function sa(a) {
|
|
4990
|
-
if (!C2) try {
|
|
4991
|
-
var b2 = await fa(a);
|
|
4992
|
-
return new Uint8Array(b2);
|
|
4993
|
-
} catch {
|
|
4994
|
-
}
|
|
4995
|
-
if (a == ra && C2) a = new Uint8Array(C2);
|
|
4996
|
-
else if (w2) a = w2(a);
|
|
4997
|
-
else throw "both async and sync fetching of the wasm failed";
|
|
4998
|
-
return a;
|
|
4999
|
-
}
|
|
5000
|
-
async function ta(a, b2) {
|
|
5001
|
-
try {
|
|
5002
|
-
var d3 = await sa(a);
|
|
5003
|
-
return await WebAssembly.instantiate(d3, b2);
|
|
5004
|
-
} catch (c) {
|
|
5005
|
-
A(`failed to asynchronously prepare wasm: ${c}`), qa(c);
|
|
5006
|
-
}
|
|
5007
|
-
}
|
|
5008
|
-
async function ua(a) {
|
|
5009
|
-
var b2 = ra;
|
|
5010
|
-
if (!C2 && typeof WebAssembly.instantiateStreaming == "function" && !y2(b2) && !t) try {
|
|
5011
|
-
var d3 = fetch(b2, { credentials: "same-origin" });
|
|
5012
|
-
return await WebAssembly.instantiateStreaming(d3, a);
|
|
5013
|
-
} catch (c) {
|
|
5014
|
-
A(`wasm streaming compile failed: ${c}`), A("falling back to ArrayBuffer instantiation");
|
|
5015
|
-
}
|
|
5016
|
-
return ta(b2, a);
|
|
5017
|
-
}
|
|
5018
|
-
class va {
|
|
5019
|
-
name = "ExitStatus";
|
|
5020
|
-
constructor(a) {
|
|
5021
|
-
this.message = `Program terminated with exit(${a})`, this.status = a;
|
|
5022
|
-
}
|
|
5023
|
-
}
|
|
5024
|
-
var wa = (a) => {
|
|
5025
|
-
for (; 0 < a.length; ) a.shift()(g2);
|
|
5026
|
-
}, xa = [], ya = [], za = () => {
|
|
5027
|
-
var a = g2.preRun.shift();
|
|
5028
|
-
ya.push(a);
|
|
5029
|
-
}, O = true;
|
|
5030
|
-
class Aa {
|
|
5031
|
-
constructor(a) {
|
|
5032
|
-
this.I = a - 24;
|
|
5033
|
-
}
|
|
5034
|
-
}
|
|
5035
|
-
var Ba = 0, Ca = 0, Da, P = (a) => {
|
|
5036
|
-
for (var b2 = ""; F2[a]; ) b2 += Da[F2[a++]];
|
|
5037
|
-
return b2;
|
|
5038
|
-
}, Q = {}, R = {}, S = {}, T = g2.BindingError = class extends Error {
|
|
5039
|
-
constructor(a) {
|
|
5040
|
-
super(a), this.name = "BindingError";
|
|
5041
|
-
}
|
|
5042
|
-
}, Ea = (a) => {
|
|
5043
|
-
throw new T(a);
|
|
5044
|
-
};
|
|
5045
|
-
function Fa(a, b2, d3 = {}) {
|
|
5046
|
-
var c = b2.name;
|
|
5047
|
-
if (!a) throw new T(`type "${c}" must have a positive integer typeid pointer`);
|
|
5048
|
-
if (R.hasOwnProperty(a)) {
|
|
5049
|
-
if (d3.K) return;
|
|
5050
|
-
throw new T(`Cannot register type '${c}' twice`);
|
|
5051
|
-
}
|
|
5052
|
-
R[a] = b2, delete S[a], Q.hasOwnProperty(a) && (b2 = Q[a], delete Q[a], b2.forEach((e) => e()));
|
|
5053
|
-
}
|
|
5054
|
-
function U(a, b2, d3 = {}) {
|
|
5055
|
-
return Fa(a, b2, d3);
|
|
5056
|
-
}
|
|
5057
|
-
var Ga = (a, b2, d3) => {
|
|
5058
|
-
switch (b2) {
|
|
5059
|
-
case 1:
|
|
5060
|
-
return d3 ? (c) => ja[c] : (c) => F2[c];
|
|
5061
|
-
case 2:
|
|
5062
|
-
return d3 ? (c) => G[c >> 1] : (c) => H[c >> 1];
|
|
5063
|
-
case 4:
|
|
5064
|
-
return d3 ? (c) => I[c >> 2] : (c) => J[c >> 2];
|
|
5065
|
-
case 8:
|
|
5066
|
-
return d3 ? (c) => la[c >> 3] : (c) => ma[c >> 3];
|
|
5067
|
-
default:
|
|
5068
|
-
throw new TypeError(`invalid integer width (${b2}): ${a}`);
|
|
5069
|
-
}
|
|
5070
|
-
}, Ha = [], V = [], Ia = (a) => {
|
|
5071
|
-
9 < a && --V[a + 1] === 0 && (V[a] = void 0, Ha.push(a));
|
|
5072
|
-
}, Ja = (a) => {
|
|
5073
|
-
if (!a) throw new T(`Cannot use deleted val. handle = ${a}`);
|
|
5074
|
-
return V[a];
|
|
5075
|
-
}, Ka = (a) => {
|
|
5076
|
-
switch (a) {
|
|
5077
|
-
case void 0:
|
|
5078
|
-
return 2;
|
|
5079
|
-
case null:
|
|
5080
|
-
return 4;
|
|
5081
|
-
case true:
|
|
5082
|
-
return 6;
|
|
5083
|
-
case false:
|
|
5084
|
-
return 8;
|
|
5085
|
-
default:
|
|
5086
|
-
let b2 = Ha.pop() || V.length;
|
|
5087
|
-
return V[b2] = a, V[b2 + 1] = 1, b2;
|
|
5088
|
-
}
|
|
5089
|
-
};
|
|
5090
|
-
function La(a) {
|
|
5091
|
-
return this.fromWireType(J[a >> 2]);
|
|
5092
|
-
}
|
|
5093
|
-
var Ma = { name: "emscripten::val", fromWireType: (a) => {
|
|
5094
|
-
var b2 = Ja(a);
|
|
5095
|
-
return Ia(a), b2;
|
|
5096
|
-
}, toWireType: (a, b2) => Ka(b2), H: 8, readValueFromPointer: La, G: null }, Na = (a, b2) => {
|
|
5097
|
-
switch (b2) {
|
|
5098
|
-
case 4:
|
|
5099
|
-
return function(d3) {
|
|
5100
|
-
return this.fromWireType(ka[d3 >> 2]);
|
|
5101
|
-
};
|
|
5102
|
-
case 8:
|
|
5103
|
-
return function(d3) {
|
|
5104
|
-
return this.fromWireType(na[d3 >> 3]);
|
|
5105
|
-
};
|
|
5106
|
-
default:
|
|
5107
|
-
throw new TypeError(`invalid float width (${b2}): ${a}`);
|
|
5108
|
-
}
|
|
5109
|
-
}, Oa = (a) => {
|
|
5110
|
-
for (; a.length; ) {
|
|
5111
|
-
var b2 = a.pop();
|
|
5112
|
-
a.pop()(b2);
|
|
5113
|
-
}
|
|
5114
|
-
};
|
|
5115
|
-
function Pa(a) {
|
|
5116
|
-
for (var b2 = 1; b2 < a.length; ++b2) if (a[b2] !== null && a[b2].G === void 0) return true;
|
|
5117
|
-
return false;
|
|
5118
|
-
}
|
|
5119
|
-
var Sa = (a, b2) => {
|
|
5120
|
-
if (g2[a].F === void 0) {
|
|
5121
|
-
var d3 = g2[a];
|
|
5122
|
-
g2[a] = function(...c) {
|
|
5123
|
-
if (!g2[a].F.hasOwnProperty(c.length)) throw new T(`Function '${b2}' called with an invalid number of arguments (${c.length}) - expects one of (${g2[a].F})!`);
|
|
5124
|
-
return g2[a].F[c.length].apply(this, c);
|
|
5125
|
-
}, g2[a].F = [], g2[a].F[d3.J] = d3;
|
|
5126
|
-
}
|
|
5127
|
-
}, Ta = (a, b2, d3) => {
|
|
5128
|
-
if (g2.hasOwnProperty(a)) {
|
|
5129
|
-
if (d3 === void 0 || g2[a].F !== void 0 && g2[a].F[d3] !== void 0) throw new T(`Cannot register public name '${a}' twice`);
|
|
5130
|
-
if (Sa(a, a), g2[a].F.hasOwnProperty(d3)) throw new T(`Cannot register multiple overloads of a function with the same number of arguments (${d3})!`);
|
|
5131
|
-
g2[a].F[d3] = b2;
|
|
5132
|
-
} else g2[a] = b2, g2[a].J = d3;
|
|
5133
|
-
}, Ua = (a, b2) => {
|
|
5134
|
-
for (var d3 = [], c = 0; c < a; c++) d3.push(J[b2 + 4 * c >> 2]);
|
|
5135
|
-
return d3;
|
|
5136
|
-
}, Va = g2.InternalError = class extends Error {
|
|
5137
|
-
constructor(a) {
|
|
5138
|
-
super(a), this.name = "InternalError";
|
|
5139
|
-
}
|
|
5140
|
-
}, Wa = [], Xa, Ya = (a, b2) => {
|
|
5141
|
-
a = P(a);
|
|
5142
|
-
var d3;
|
|
5143
|
-
if ((d3 = Wa[b2]) || (Wa[b2] = d3 = Xa.get(b2)), typeof d3 != "function") throw new T(`unknown function pointer with signature ${a}: ${b2}`);
|
|
5144
|
-
return d3;
|
|
5145
|
-
};
|
|
5146
|
-
class Za extends Error {
|
|
5147
|
-
}
|
|
5148
|
-
for (var ab = (a) => {
|
|
5149
|
-
a = $a(a);
|
|
5150
|
-
var b2 = P(a);
|
|
5151
|
-
return W(a), b2;
|
|
5152
|
-
}, bb = (a, b2) => {
|
|
5153
|
-
function d3(f) {
|
|
5154
|
-
e[f] || R[f] || (S[f] ? S[f].forEach(d3) : (c.push(f), e[f] = true));
|
|
5155
|
-
}
|
|
5156
|
-
var c = [], e = {};
|
|
5157
|
-
throw b2.forEach(d3), new Za(`${a}: ` + c.map(ab).join([", "]));
|
|
5158
|
-
}, cb = (a, b2) => {
|
|
5159
|
-
function d3(h2) {
|
|
5160
|
-
if (h2 = b2(h2), h2.length !== c.length) throw new Va("Mismatched type converter count");
|
|
5161
|
-
for (var l3 = 0; l3 < c.length; ++l3) U(c[l3], h2[l3]);
|
|
5162
|
-
}
|
|
5163
|
-
var c = [];
|
|
5164
|
-
c.forEach((h2) => S[h2] = a);
|
|
5165
|
-
var e = Array(a.length), f = [], m3 = 0;
|
|
5166
|
-
a.forEach((h2, l3) => {
|
|
5167
|
-
R.hasOwnProperty(h2) ? e[l3] = R[h2] : (f.push(h2), Q.hasOwnProperty(h2) || (Q[h2] = []), Q[h2].push(() => {
|
|
5168
|
-
e[l3] = R[h2], ++m3, m3 === f.length && d3(e);
|
|
5169
|
-
}));
|
|
5170
|
-
}), f.length === 0 && d3(e);
|
|
5171
|
-
}, db = (a) => {
|
|
5172
|
-
a = a.trim();
|
|
5173
|
-
let b2 = a.indexOf("(");
|
|
5174
|
-
return b2 === -1 ? a : a.slice(0, b2);
|
|
5175
|
-
}, eb = typeof TextDecoder < "u" ? new TextDecoder() : void 0, fb = (a = 0, b2 = NaN) => {
|
|
5176
|
-
var d3 = F2, c = a + b2;
|
|
5177
|
-
for (b2 = a; d3[b2] && !(b2 >= c); ) ++b2;
|
|
5178
|
-
if (16 < b2 - a && d3.buffer && eb) return eb.decode(d3.subarray(a, b2));
|
|
5179
|
-
for (c = ""; a < b2; ) {
|
|
5180
|
-
var e = d3[a++];
|
|
5181
|
-
if (e & 128) {
|
|
5182
|
-
var f = d3[a++] & 63;
|
|
5183
|
-
if ((e & 224) == 192) c += String.fromCharCode((e & 31) << 6 | f);
|
|
5184
|
-
else {
|
|
5185
|
-
var m3 = d3[a++] & 63;
|
|
5186
|
-
e = (e & 240) == 224 ? (e & 15) << 12 | f << 6 | m3 : (e & 7) << 18 | f << 12 | m3 << 6 | d3[a++] & 63, 65536 > e ? c += String.fromCharCode(e) : (e -= 65536, c += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023));
|
|
5187
|
-
}
|
|
5188
|
-
} else c += String.fromCharCode(e);
|
|
5189
|
-
}
|
|
5190
|
-
return c;
|
|
5191
|
-
}, gb = typeof TextDecoder < "u" ? new TextDecoder("utf-16le") : void 0, hb = (a, b2) => {
|
|
5192
|
-
for (var d3 = a >> 1, c = d3 + b2 / 2; !(d3 >= c) && H[d3]; ) ++d3;
|
|
5193
|
-
if (d3 <<= 1, 32 < d3 - a && gb) return gb.decode(F2.subarray(a, d3));
|
|
5194
|
-
for (d3 = "", c = 0; !(c >= b2 / 2); ++c) {
|
|
5195
|
-
var e = G[a + 2 * c >> 1];
|
|
5196
|
-
if (e == 0) break;
|
|
5197
|
-
d3 += String.fromCharCode(e);
|
|
5198
|
-
}
|
|
5199
|
-
return d3;
|
|
5200
|
-
}, ib = (a, b2, d3) => {
|
|
5201
|
-
if (d3 ??= 2147483647, 2 > d3) return 0;
|
|
5202
|
-
d3 -= 2;
|
|
5203
|
-
var c = b2;
|
|
5204
|
-
d3 = d3 < 2 * a.length ? d3 / 2 : a.length;
|
|
5205
|
-
for (var e = 0; e < d3; ++e) G[b2 >> 1] = a.charCodeAt(e), b2 += 2;
|
|
5206
|
-
return G[b2 >> 1] = 0, b2 - c;
|
|
5207
|
-
}, jb = (a) => 2 * a.length, kb = (a, b2) => {
|
|
5208
|
-
for (var d3 = 0, c = ""; !(d3 >= b2 / 4); ) {
|
|
5209
|
-
var e = I[a + 4 * d3 >> 2];
|
|
5210
|
-
if (e == 0) break;
|
|
5211
|
-
++d3, 65536 <= e ? (e -= 65536, c += String.fromCharCode(55296 | e >> 10, 56320 | e & 1023)) : c += String.fromCharCode(e);
|
|
5212
|
-
}
|
|
5213
|
-
return c;
|
|
5214
|
-
}, lb = (a, b2, d3) => {
|
|
5215
|
-
if (d3 ??= 2147483647, 4 > d3) return 0;
|
|
5216
|
-
var c = b2;
|
|
5217
|
-
d3 = c + d3 - 4;
|
|
5218
|
-
for (var e = 0; e < a.length; ++e) {
|
|
5219
|
-
var f = a.charCodeAt(e);
|
|
5220
|
-
if (55296 <= f && 57343 >= f) {
|
|
5221
|
-
var m3 = a.charCodeAt(++e);
|
|
5222
|
-
f = 65536 + ((f & 1023) << 10) | m3 & 1023;
|
|
5223
|
-
}
|
|
5224
|
-
if (I[b2 >> 2] = f, b2 += 4, b2 + 4 > d3) break;
|
|
5225
|
-
}
|
|
5226
|
-
return I[b2 >> 2] = 0, b2 - c;
|
|
5227
|
-
}, mb = (a) => {
|
|
5228
|
-
for (var b2 = 0, d3 = 0; d3 < a.length; ++d3) {
|
|
5229
|
-
var c = a.charCodeAt(d3);
|
|
5230
|
-
55296 <= c && 57343 >= c && ++d3, b2 += 4;
|
|
5231
|
-
}
|
|
5232
|
-
return b2;
|
|
5233
|
-
}, nb = 0, ob = [], pb = (a) => {
|
|
5234
|
-
var b2 = ob.length;
|
|
5235
|
-
return ob.push(a), b2;
|
|
5236
|
-
}, qb = (a, b2) => {
|
|
5237
|
-
var d3 = R[a];
|
|
5238
|
-
if (d3 === void 0) throw a = `${b2} has unknown type ${ab(a)}`, new T(a);
|
|
5239
|
-
return d3;
|
|
5240
|
-
}, rb = (a, b2) => {
|
|
5241
|
-
for (var d3 = Array(a), c = 0; c < a; ++c) d3[c] = qb(J[b2 + 4 * c >> 2], `parameter ${c}`);
|
|
5242
|
-
return d3;
|
|
5243
|
-
}, sb = (a, b2, d3) => {
|
|
5244
|
-
var c = [];
|
|
5245
|
-
return a = a.toWireType(c, d3), c.length && (J[b2 >> 2] = Ka(c)), a;
|
|
5246
|
-
}, X = {}, tb = (a) => {
|
|
5247
|
-
ia = a, O || 0 < nb || (g2.onExit?.(a), E3 = true), u2(a, new va(a));
|
|
5248
|
-
}, ub = (a) => {
|
|
5249
|
-
if (!E3) try {
|
|
5250
|
-
if (a(), !(O || 0 < nb)) try {
|
|
5251
|
-
ia = a = ia, tb(a);
|
|
5252
|
-
} catch (b2) {
|
|
5253
|
-
b2 instanceof va || b2 == "unwind" || u2(1, b2);
|
|
5254
|
-
}
|
|
5255
|
-
} catch (b2) {
|
|
5256
|
-
b2 instanceof va || b2 == "unwind" || u2(1, b2);
|
|
5257
|
-
}
|
|
5258
|
-
}, vb = Array(256), Y = 0; 256 > Y; ++Y) vb[Y] = String.fromCharCode(Y);
|
|
5259
|
-
Da = vb, V.push(0, 1, void 0, 1, null, 1, true, 1, false, 1), g2.count_emval_handles = () => V.length / 2 - 5 - Ha.length, g2.noExitRuntime && (O = g2.noExitRuntime), g2.printErr && (A = g2.printErr), g2.wasmBinary && (C2 = g2.wasmBinary);
|
|
5260
|
-
var Ab = { u: (a, b2, d3) => {
|
|
5261
|
-
var c = new Aa(a);
|
|
5262
|
-
throw J[c.I + 16 >> 2] = 0, J[c.I + 4 >> 2] = b2, J[c.I + 8 >> 2] = d3, Ba = a, Ca++, Ba;
|
|
5263
|
-
}, v: () => qa(""), l: (a, b2, d3) => {
|
|
5264
|
-
b2 = P(b2), U(a, { name: b2, fromWireType: (c) => c, toWireType: function(c, e) {
|
|
5265
|
-
if (typeof e != "bigint" && typeof e != "number") throw e === null ? e = "null" : (c = typeof e, e = c === "object" || c === "array" || c === "function" ? e.toString() : "" + e), new TypeError(`Cannot convert "${e}" to ${this.name}`);
|
|
5266
|
-
return typeof e == "number" && (e = BigInt(e)), e;
|
|
5267
|
-
}, H: 8, readValueFromPointer: Ga(b2, d3, b2.indexOf("u") == -1), G: null });
|
|
5268
|
-
}, o: (a, b2, d3, c) => {
|
|
5269
|
-
b2 = P(b2), U(a, { name: b2, fromWireType: function(e) {
|
|
5270
|
-
return !!e;
|
|
5271
|
-
}, toWireType: function(e, f) {
|
|
5272
|
-
return f ? d3 : c;
|
|
5273
|
-
}, H: 8, readValueFromPointer: function(e) {
|
|
5274
|
-
return this.fromWireType(F2[e]);
|
|
5275
|
-
}, G: null });
|
|
5276
|
-
}, m: (a) => U(a, Ma), k: (a, b2, d3) => {
|
|
5277
|
-
b2 = P(b2), U(a, { name: b2, fromWireType: (c) => c, toWireType: (c, e) => e, H: 8, readValueFromPointer: Na(b2, d3), G: null });
|
|
5278
|
-
}, c: (a, b2, d3, c, e, f, m3) => {
|
|
5279
|
-
var h2 = Ua(b2, d3);
|
|
5280
|
-
a = P(a), a = db(a), e = Ya(c, e), Ta(a, function() {
|
|
5281
|
-
bb(`Cannot call ${a} due to unbound types`, h2);
|
|
5282
|
-
}, b2 - 1), cb(h2, (l3) => {
|
|
5283
|
-
var k = [l3[0], null].concat(l3.slice(1));
|
|
5284
|
-
l3 = a;
|
|
5285
|
-
var p2 = a, z = e, n = k.length;
|
|
5286
|
-
if (2 > n) throw new T("argTypes array size mismatch! Must at least get return value and 'this' types!");
|
|
5287
|
-
var B = k[1] !== null && false, M = Pa(k), Qa = k[0].name !== "void";
|
|
5288
|
-
z = [p2, Ea, z, f, Oa, k[0], k[1]];
|
|
5289
|
-
for (var x = 0; x < n - 2; ++x) z.push(k[x + 2]);
|
|
5290
|
-
if (!M) for (x = B ? 1 : 2; x < k.length; ++x) k[x].G !== null && z.push(k[x].G);
|
|
5291
|
-
M = Pa(k), x = k.length - 2;
|
|
5292
|
-
var r = [], N = ["fn"];
|
|
5293
|
-
for (B && N.push("thisWired"), n = 0; n < x; ++n) r.push(`arg${n}`), N.push(`arg${n}Wired`);
|
|
5294
|
-
r = r.join(","), N = N.join(","), r = `return function (${r}) {
|
|
5295
|
-
`, M && (r += `var destructors = [];
|
|
5296
|
-
`);
|
|
5297
|
-
var Ra = M ? "destructors" : "null", oa = "humanName throwBindingError invoker fn runDestructors retType classParam".split(" ");
|
|
5298
|
-
for (B && (r += `var thisWired = classParam['toWireType'](${Ra}, this);
|
|
5299
|
-
`), n = 0; n < x; ++n) r += `var arg${n}Wired = argType${n}['toWireType'](${Ra}, arg${n});
|
|
5300
|
-
`, oa.push(`argType${n}`);
|
|
5301
|
-
if (r += (Qa || m3 ? "var rv = " : "") + `invoker(${N});
|
|
5302
|
-
`, M) r += `runDestructors(destructors);
|
|
5303
|
-
`;
|
|
5304
|
-
else for (n = B ? 1 : 2; n < k.length; ++n) B = n === 1 ? "thisWired" : "arg" + (n - 2) + "Wired", k[n].G !== null && (r += `${B}_dtor(${B});
|
|
5305
|
-
`, oa.push(`${B}_dtor`));
|
|
5306
|
-
Qa && (r += `var ret = retType['fromWireType'](rv);
|
|
5307
|
-
return ret;
|
|
5308
|
-
`);
|
|
5309
|
-
let [yb, zb] = [oa, r + `}
|
|
5310
|
-
`];
|
|
5311
|
-
if (k = new _F(...yb, zb)(...z), p2 = Object.defineProperty(k, "name", { value: p2 }), k = b2 - 1, !g2.hasOwnProperty(l3)) throw new Va("Replacing nonexistent public symbol");
|
|
5312
|
-
return g2[l3].F !== void 0 && k !== void 0 ? g2[l3].F[k] = p2 : (g2[l3] = p2, g2[l3].J = k), [];
|
|
5313
|
-
});
|
|
5314
|
-
}, b: (a, b2, d3, c, e) => {
|
|
5315
|
-
if (b2 = P(b2), e === -1 && (e = 4294967295), e = (h2) => h2, c === 0) {
|
|
5316
|
-
var f = 32 - 8 * d3;
|
|
5317
|
-
e = (h2) => h2 << f >>> f;
|
|
5318
|
-
}
|
|
5319
|
-
var m3 = b2.includes("unsigned") ? function(h2, l3) {
|
|
5320
|
-
return l3 >>> 0;
|
|
5321
|
-
} : function(h2, l3) {
|
|
5322
|
-
return l3;
|
|
5323
|
-
};
|
|
5324
|
-
U(a, { name: b2, fromWireType: e, toWireType: m3, H: 8, readValueFromPointer: Ga(b2, d3, c !== 0), G: null });
|
|
5325
|
-
}, a: (a, b2, d3) => {
|
|
5326
|
-
function c(f) {
|
|
5327
|
-
return new e(ja.buffer, J[f + 4 >> 2], J[f >> 2]);
|
|
5328
|
-
}
|
|
5329
|
-
var e = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, BigInt64Array, BigUint64Array][b2];
|
|
5330
|
-
d3 = P(d3), U(a, { name: d3, fromWireType: c, H: 8, readValueFromPointer: c }, { K: true });
|
|
5331
|
-
}, n: (a, b2) => {
|
|
5332
|
-
b2 = P(b2), U(a, { name: b2, fromWireType: function(d3) {
|
|
5333
|
-
for (var c = J[d3 >> 2], e = d3 + 4, f, m3 = e, h2 = 0; h2 <= c; ++h2) {
|
|
5334
|
-
var l3 = e + h2;
|
|
5335
|
-
(h2 == c || F2[l3] == 0) && (m3 = m3 ? fb(m3, l3 - m3) : "", f === void 0 ? f = m3 : (f += "\0", f += m3), m3 = l3 + 1);
|
|
5336
|
-
}
|
|
5337
|
-
return W(d3), f;
|
|
5338
|
-
}, toWireType: function(d3, c) {
|
|
5339
|
-
c instanceof ArrayBuffer && (c = new Uint8Array(c));
|
|
5340
|
-
var e, f = typeof c == "string";
|
|
5341
|
-
if (!(f || ArrayBuffer.isView(c) && c.BYTES_PER_ELEMENT == 1)) throw new T("Cannot pass non-string to std::string");
|
|
5342
|
-
var m3;
|
|
5343
|
-
if (f) for (e = m3 = 0; e < c.length; ++e) {
|
|
5344
|
-
var h2 = c.charCodeAt(e);
|
|
5345
|
-
127 >= h2 ? m3++ : 2047 >= h2 ? m3 += 2 : 55296 <= h2 && 57343 >= h2 ? (m3 += 4, ++e) : m3 += 3;
|
|
5346
|
-
}
|
|
5347
|
-
else m3 = c.length;
|
|
5348
|
-
if (e = m3, m3 = wb(4 + e + 1), h2 = m3 + 4, J[m3 >> 2] = e, f) {
|
|
5349
|
-
if (f = h2, h2 = e + 1, e = F2, 0 < h2) {
|
|
5350
|
-
h2 = f + h2 - 1;
|
|
5351
|
-
for (var l3 = 0; l3 < c.length; ++l3) {
|
|
5352
|
-
var k = c.charCodeAt(l3);
|
|
5353
|
-
if (55296 <= k && 57343 >= k) {
|
|
5354
|
-
var p2 = c.charCodeAt(++l3);
|
|
5355
|
-
k = 65536 + ((k & 1023) << 10) | p2 & 1023;
|
|
5356
|
-
}
|
|
5357
|
-
if (127 >= k) {
|
|
5358
|
-
if (f >= h2) break;
|
|
5359
|
-
e[f++] = k;
|
|
5360
|
-
} else {
|
|
5361
|
-
if (2047 >= k) {
|
|
5362
|
-
if (f + 1 >= h2) break;
|
|
5363
|
-
e[f++] = 192 | k >> 6;
|
|
5364
|
-
} else {
|
|
5365
|
-
if (65535 >= k) {
|
|
5366
|
-
if (f + 2 >= h2) break;
|
|
5367
|
-
e[f++] = 224 | k >> 12;
|
|
5368
|
-
} else {
|
|
5369
|
-
if (f + 3 >= h2) break;
|
|
5370
|
-
e[f++] = 240 | k >> 18, e[f++] = 128 | k >> 12 & 63;
|
|
5371
|
-
}
|
|
5372
|
-
e[f++] = 128 | k >> 6 & 63;
|
|
5373
|
-
}
|
|
5374
|
-
e[f++] = 128 | k & 63;
|
|
5375
|
-
}
|
|
5376
|
-
}
|
|
5377
|
-
e[f] = 0;
|
|
5378
|
-
}
|
|
5379
|
-
} else F2.set(c, h2);
|
|
5380
|
-
return d3 !== null && d3.push(W, m3), m3;
|
|
5381
|
-
}, H: 8, readValueFromPointer: La, G(d3) {
|
|
5382
|
-
W(d3);
|
|
5383
|
-
} });
|
|
5384
|
-
}, e: (a, b2, d3) => {
|
|
5385
|
-
if (d3 = P(d3), b2 === 2) var c = hb, e = ib, f = jb, m3 = (h2) => H[h2 >> 1];
|
|
5386
|
-
else b2 === 4 && (c = kb, e = lb, f = mb, m3 = (h2) => J[h2 >> 2]);
|
|
5387
|
-
U(a, { name: d3, fromWireType: (h2) => {
|
|
5388
|
-
for (var l3 = J[h2 >> 2], k, p2 = h2 + 4, z = 0; z <= l3; ++z) {
|
|
5389
|
-
var n = h2 + 4 + z * b2;
|
|
5390
|
-
(z == l3 || m3(n) == 0) && (p2 = c(p2, n - p2), k === void 0 ? k = p2 : (k += "\0", k += p2), p2 = n + b2);
|
|
5391
|
-
}
|
|
5392
|
-
return W(h2), k;
|
|
5393
|
-
}, toWireType: (h2, l3) => {
|
|
5394
|
-
if (typeof l3 != "string") throw new T(`Cannot pass non-string to C++ string type ${d3}`);
|
|
5395
|
-
var k = f(l3), p2 = wb(4 + k + b2);
|
|
5396
|
-
return J[p2 >> 2] = k / b2, e(l3, p2 + 4, k + b2), h2 !== null && h2.push(W, p2), p2;
|
|
5397
|
-
}, H: 8, readValueFromPointer: La, G(h2) {
|
|
5398
|
-
W(h2);
|
|
5399
|
-
} });
|
|
5400
|
-
}, f: (a) => {
|
|
5401
|
-
U(a, Ma);
|
|
5402
|
-
}, p: (a, b2) => {
|
|
5403
|
-
b2 = P(b2), U(a, { L: true, name: b2, H: 0, fromWireType: () => {
|
|
5404
|
-
}, toWireType: () => {
|
|
5405
|
-
} });
|
|
5406
|
-
}, s: () => {
|
|
5407
|
-
O = false, nb = 0;
|
|
5408
|
-
}, i: (a, b2, d3, c) => (a = ob[a], b2 = Ja(b2), a(null, b2, d3, c)), d: Ia, h: (a, b2, d3) => {
|
|
5409
|
-
b2 = rb(a, b2);
|
|
5410
|
-
var c = b2.shift();
|
|
5411
|
-
a--;
|
|
5412
|
-
var e = `return function (obj, func, destructorsRef, args) {
|
|
5413
|
-
`, f = 0, m3 = [];
|
|
5414
|
-
d3 === 0 && m3.push("obj");
|
|
5415
|
-
for (var h2 = ["retType"], l3 = [c], k = 0; k < a; ++k) m3.push(`arg${k}`), h2.push(`argType${k}`), l3.push(b2[k]), e += ` var arg${k} = argType${k}.readValueFromPointer(args${f ? "+" + f : ""});
|
|
5416
|
-
`, f += b2[k].H;
|
|
5417
|
-
return e += ` var rv = ${d3 === 1 ? "new func" : "func.call"}(${m3.join(", ")});
|
|
5418
|
-
`, c.L || (h2.push("emval_returnValue"), l3.push(sb), e += ` return emval_returnValue(retType, destructorsRef, rv);
|
|
5419
|
-
`), a = new _F(...h2, e + `};
|
|
5420
|
-
`)(...l3), d3 = `methodCaller<(${b2.map((p2) => p2.name).join(", ")}) => ${c.name}>`, pb(Object.defineProperty(a, "name", { value: d3 }));
|
|
5421
|
-
}, q: (a) => {
|
|
5422
|
-
9 < a && (V[a + 1] += 1);
|
|
5423
|
-
}, g: (a) => {
|
|
5424
|
-
var b2 = Ja(a);
|
|
5425
|
-
Oa(b2), Ia(a);
|
|
5426
|
-
}, j: (a, b2) => (a = qb(a, "_emval_take_value"), a = a.readValueFromPointer(b2), Ka(a)), t: (a, b2) => {
|
|
5427
|
-
if (X[a] && (clearTimeout(X[a].id), delete X[a]), !b2) return 0;
|
|
5428
|
-
var d3 = setTimeout(() => {
|
|
5429
|
-
delete X[a], ub(() => xb(a, performance.now()));
|
|
5430
|
-
}, b2);
|
|
5431
|
-
return X[a] = { id: d3, M: b2 }, 0;
|
|
5432
|
-
}, w: (a) => {
|
|
5433
|
-
var b2 = F2.length;
|
|
5434
|
-
if (a >>>= 0, 2147483648 < a) return false;
|
|
5435
|
-
for (var d3 = 1; 4 >= d3; d3 *= 2) {
|
|
5436
|
-
var c = b2 * (1 + 0.2 / d3);
|
|
5437
|
-
c = Math.min(c, a + 100663296);
|
|
5438
|
-
a: {
|
|
5439
|
-
c = (Math.min(2147483648, 65536 * Math.ceil(Math.max(a, c) / 65536)) - D.buffer.byteLength + 65535) / 65536 | 0;
|
|
5440
|
-
try {
|
|
5441
|
-
D.grow(c), pa();
|
|
5442
|
-
var e = 1;
|
|
5443
|
-
break a;
|
|
5444
|
-
} catch {
|
|
5445
|
-
}
|
|
5446
|
-
e = void 0;
|
|
5447
|
-
}
|
|
5448
|
-
if (e) return true;
|
|
5449
|
-
}
|
|
5450
|
-
return false;
|
|
5451
|
-
}, r: tb }, Z = await (async function() {
|
|
5452
|
-
function a(c) {
|
|
5453
|
-
return Z = c.exports, D = Z.x, pa(), Xa = Z.D, K--, g2.monitorRunDependencies?.(K), K == 0 && L && (c = L, L = null, c()), Z;
|
|
5454
|
-
}
|
|
5455
|
-
K++, g2.monitorRunDependencies?.(K);
|
|
5456
|
-
var b2 = { a: Ab };
|
|
5457
|
-
if (g2.instantiateWasm) return new Promise((c) => {
|
|
5458
|
-
g2.instantiateWasm(b2, (e, f) => {
|
|
5459
|
-
c(a(e, f));
|
|
5460
|
-
});
|
|
5461
|
-
});
|
|
5462
|
-
ra ??= g2.locateFile ? g2.locateFile ? g2.locateFile("silk.wasm", v) : v + "silk.wasm" : new URL("silk.wasm", import_meta.url).href;
|
|
5463
|
-
try {
|
|
5464
|
-
var d3 = await ua(b2);
|
|
5465
|
-
return a(d3.instance);
|
|
5466
|
-
} catch (c) {
|
|
5467
|
-
return q(c), Promise.reject(c);
|
|
5468
|
-
}
|
|
5469
|
-
})(), $a = Z.z, wb = Z.A, W = Z.B, xb = Z.C;
|
|
5470
|
-
function Bb() {
|
|
5471
|
-
function a() {
|
|
5472
|
-
if (g2.calledRun = true, !E3) {
|
|
5473
|
-
if (Z.y(), aa(g2), g2.onRuntimeInitialized?.(), g2.postRun) for (typeof g2.postRun == "function" && (g2.postRun = [g2.postRun]); g2.postRun.length; ) {
|
|
5474
|
-
var b2 = g2.postRun.shift();
|
|
5475
|
-
xa.push(b2);
|
|
5476
|
-
}
|
|
5477
|
-
wa(xa);
|
|
5478
|
-
}
|
|
5479
|
-
}
|
|
5480
|
-
if (0 < K) L = Bb;
|
|
5481
|
-
else {
|
|
5482
|
-
if (g2.preRun) for (typeof g2.preRun == "function" && (g2.preRun = [g2.preRun]); g2.preRun.length; ) za();
|
|
5483
|
-
wa(ya), 0 < K ? L = Bb : g2.setStatus ? (g2.setStatus("Running..."), setTimeout(() => {
|
|
5484
|
-
setTimeout(() => g2.setStatus(""), 1), a();
|
|
5485
|
-
}, 1)) : a();
|
|
5486
|
-
}
|
|
5487
|
-
}
|
|
5488
|
-
if (g2.preInit) for (typeof g2.preInit == "function" && (g2.preInit = [g2.preInit]); 0 < g2.preInit.length; ) g2.preInit.shift()();
|
|
5489
|
-
return Bb(), moduleRtn = ba, moduleRtn;
|
|
5490
|
-
};
|
|
5491
|
-
silk_default = Module;
|
|
5492
|
-
audioEncodingNames = ["int", "float"];
|
|
5493
|
-
wavFileTypeAudioEncodings = [0, 0, 0, 1];
|
|
5494
|
-
}
|
|
5495
|
-
});
|
|
5496
|
-
|
|
5497
4736
|
// index.ts
|
|
5498
4737
|
var index_exports = {};
|
|
5499
4738
|
__export(index_exports, {
|
|
@@ -5776,11 +5015,11 @@ var import_node_os = __toESM(require("os"), 1);
|
|
|
5776
5015
|
// src/outbound/outbound-service.ts
|
|
5777
5016
|
var path3 = __toESM(require("path"), 1);
|
|
5778
5017
|
|
|
5779
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
5018
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/QQBot.js
|
|
5780
5019
|
var fs3 = __toESM(require("fs"), 1);
|
|
5781
5020
|
var path = __toESM(require("path"), 1);
|
|
5782
5021
|
|
|
5783
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
5022
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/middleware/types.js
|
|
5784
5023
|
function resolvePolicy(ctx, path20, explicit, defaultValue) {
|
|
5785
5024
|
if (explicit !== void 0 && explicit !== null) {
|
|
5786
5025
|
return explicit;
|
|
@@ -5856,7 +5095,7 @@ function createMiddlewareContext(params) {
|
|
|
5856
5095
|
return ctx;
|
|
5857
5096
|
}
|
|
5858
5097
|
|
|
5859
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
5098
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/types.js
|
|
5860
5099
|
var ApiError = class extends Error {
|
|
5861
5100
|
httpStatus;
|
|
5862
5101
|
path;
|
|
@@ -5889,7 +5128,7 @@ var StreamContentType = {
|
|
|
5889
5128
|
MARKDOWN: "markdown"
|
|
5890
5129
|
};
|
|
5891
5130
|
|
|
5892
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
5131
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/utils/format.js
|
|
5893
5132
|
function formatErrorMessage(err) {
|
|
5894
5133
|
if (err instanceof Error) {
|
|
5895
5134
|
let formatted = err.message || err.name || "Error";
|
|
@@ -5936,7 +5175,7 @@ function formatFileSize(bytes) {
|
|
|
5936
5175
|
return `${(bytes / 1024 / 1024 / 1024).toFixed(2)} GB`;
|
|
5937
5176
|
}
|
|
5938
5177
|
|
|
5939
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
5178
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/api/api-client.js
|
|
5940
5179
|
var DEFAULT_BASE_URL = "https://api.sgroup.qq.com";
|
|
5941
5180
|
var DEFAULT_TIMEOUT_MS = 3e4;
|
|
5942
5181
|
var FILE_UPLOAD_TIMEOUT_MS = 12e4;
|
|
@@ -6031,12 +5270,12 @@ var ApiClient = class {
|
|
|
6031
5270
|
}
|
|
6032
5271
|
};
|
|
6033
5272
|
|
|
6034
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
5273
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/api/media-chunked.js
|
|
6035
5274
|
var crypto = __toESM(require("crypto"), 1);
|
|
6036
5275
|
var fs = __toESM(require("fs"), 1);
|
|
6037
5276
|
var https = __toESM(require("https"), 1);
|
|
6038
5277
|
|
|
6039
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
5278
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/api/retry.js
|
|
6040
5279
|
async function withRetry(fn, policy, persistentPolicy, logger) {
|
|
6041
5280
|
let lastError = null;
|
|
6042
5281
|
for (let attempt = 0; attempt <= policy.maxRetries; attempt++) {
|
|
@@ -6128,7 +5367,7 @@ function buildPartFinishPersistentPolicy(retryTimeoutMs, retryableCodes = PART_F
|
|
|
6128
5367
|
var PART_FINISH_RETRYABLE_CODES = /* @__PURE__ */ new Set([40093001]);
|
|
6129
5368
|
var UPLOAD_PREPARE_FALLBACK_CODE = 40093002;
|
|
6130
5369
|
|
|
6131
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
5370
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/api/routes.js
|
|
6132
5371
|
function messagePath(scope, targetId) {
|
|
6133
5372
|
return scope === "c2c" ? `/v2/users/${targetId}/messages` : `/v2/groups/${targetId}/messages`;
|
|
6134
5373
|
}
|
|
@@ -6165,7 +5404,7 @@ function getNextMsgSeq(_msgId) {
|
|
|
6165
5404
|
return (timePart ^ random) % 65536;
|
|
6166
5405
|
}
|
|
6167
5406
|
|
|
6168
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
5407
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/api/media-chunked.js
|
|
6169
5408
|
var UploadDailyLimitExceededError = class extends Error {
|
|
6170
5409
|
filePath;
|
|
6171
5410
|
fileSize;
|
|
@@ -6424,7 +5663,7 @@ function sleep2(ms) {
|
|
|
6424
5663
|
return new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
6425
5664
|
}
|
|
6426
5665
|
|
|
6427
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
5666
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/api/media.js
|
|
6428
5667
|
var fs2 = __toESM(require("fs"), 1);
|
|
6429
5668
|
var MediaApi = class {
|
|
6430
5669
|
client;
|
|
@@ -6505,7 +5744,7 @@ var MediaApi = class {
|
|
|
6505
5744
|
}
|
|
6506
5745
|
};
|
|
6507
5746
|
|
|
6508
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
5747
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/api/messages.js
|
|
6509
5748
|
var MessageApi = class {
|
|
6510
5749
|
client;
|
|
6511
5750
|
tokenManager;
|
|
@@ -6693,7 +5932,7 @@ var MessageApi = class {
|
|
|
6693
5932
|
}
|
|
6694
5933
|
};
|
|
6695
5934
|
|
|
6696
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
5935
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/api/token.js
|
|
6697
5936
|
var DEFAULT_TOKEN_BASE_URL = "https://bots.qq.com";
|
|
6698
5937
|
var TOKEN_PATH = "/app/getAppAccessToken";
|
|
6699
5938
|
var TokenManager = class {
|
|
@@ -6880,7 +6119,7 @@ var import_websocket = __toESM(require_websocket(), 1);
|
|
|
6880
6119
|
var import_websocket_server = __toESM(require_websocket_server(), 1);
|
|
6881
6120
|
var wrapper_default = import_websocket.default;
|
|
6882
6121
|
|
|
6883
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
6122
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/gateway/codec.js
|
|
6884
6123
|
function decodeGatewayMessageData(data) {
|
|
6885
6124
|
if (typeof data === "string") {
|
|
6886
6125
|
return data;
|
|
@@ -6907,7 +6146,7 @@ function readOptionalMessageSceneExt(event) {
|
|
|
6907
6146
|
return scene?.ext;
|
|
6908
6147
|
}
|
|
6909
6148
|
|
|
6910
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
6149
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/gateway/constants.js
|
|
6911
6150
|
var INTENTS = {
|
|
6912
6151
|
GUILDS: 1 << 0,
|
|
6913
6152
|
GUILD_MEMBERS: 1 << 1,
|
|
@@ -6980,7 +6219,7 @@ var GatewayEvent = {
|
|
|
6980
6219
|
MESSAGE_REACTION_REMOVE: "MESSAGE_REACTION_REMOVE"
|
|
6981
6220
|
};
|
|
6982
6221
|
|
|
6983
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
6222
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/gateway/event-dispatcher.js
|
|
6984
6223
|
var REF_INDEX_KEY = "msg_idx";
|
|
6985
6224
|
function parseRefIndices(ext, msgType, msgElements) {
|
|
6986
6225
|
let refMsgIdx;
|
|
@@ -7121,7 +6360,7 @@ function dispatchEvent(eventType, data, _accountId, _log) {
|
|
|
7121
6360
|
return { action: "raw", type: eventType, data };
|
|
7122
6361
|
}
|
|
7123
6362
|
|
|
7124
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
6363
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/gateway/reconnect.js
|
|
7125
6364
|
var ReconnectState = class {
|
|
7126
6365
|
accountId;
|
|
7127
6366
|
log;
|
|
@@ -7232,7 +6471,7 @@ var ReconnectState = class {
|
|
|
7232
6471
|
}
|
|
7233
6472
|
};
|
|
7234
6473
|
|
|
7235
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
6474
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/gateway/gateway-connection.js
|
|
7236
6475
|
var GatewayConnection = class {
|
|
7237
6476
|
isAborted = false;
|
|
7238
6477
|
currentWs = null;
|
|
@@ -7490,7 +6729,7 @@ function previewPayload(data) {
|
|
|
7490
6729
|
}
|
|
7491
6730
|
}
|
|
7492
6731
|
|
|
7493
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
6732
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/transport/webhook-verify.js
|
|
7494
6733
|
var crypto2 = __toESM(require("crypto"), 1);
|
|
7495
6734
|
function deriveSeed(botSecret) {
|
|
7496
6735
|
let seed = botSecret;
|
|
@@ -7542,7 +6781,7 @@ function signValidationResponse(params) {
|
|
|
7542
6781
|
};
|
|
7543
6782
|
}
|
|
7544
6783
|
|
|
7545
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
6784
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/transport/webhook-server-node.js
|
|
7546
6785
|
var http = __toESM(require("http"), 1);
|
|
7547
6786
|
var NodeHttpWebhookServer = class {
|
|
7548
6787
|
server = null;
|
|
@@ -7590,7 +6829,7 @@ var NodeHttpWebhookServer = class {
|
|
|
7590
6829
|
}
|
|
7591
6830
|
};
|
|
7592
6831
|
|
|
7593
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
6832
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/transport/webhook.js
|
|
7594
6833
|
var OP_DISPATCH = 0;
|
|
7595
6834
|
var OP_HTTP_CALLBACK_ACK = 12;
|
|
7596
6835
|
var OP_VALIDATION = 13;
|
|
@@ -7734,7 +6973,7 @@ function getHeader(headers, key) {
|
|
|
7734
6973
|
return val;
|
|
7735
6974
|
}
|
|
7736
6975
|
|
|
7737
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
6976
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/utils/file-utils.js
|
|
7738
6977
|
var MAX_UPLOAD_SIZE = 20 * 1024 * 1024;
|
|
7739
6978
|
var CHUNKED_UPLOAD_MAX_SIZE = 100 * 1024 * 1024;
|
|
7740
6979
|
var LARGE_FILE_THRESHOLD = 5 * 1024 * 1024;
|
|
@@ -7752,7 +6991,7 @@ function sanitizeFileName(name) {
|
|
|
7752
6991
|
return cleaned || "file";
|
|
7753
6992
|
}
|
|
7754
6993
|
|
|
7755
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
6994
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/utils/upload-cache.js
|
|
7756
6995
|
var crypto3 = __toESM(require("crypto"), 1);
|
|
7757
6996
|
var MAX_CACHE_SIZE = 500;
|
|
7758
6997
|
function computeFileHash(data) {
|
|
@@ -7817,7 +7056,7 @@ var UploadCache = class {
|
|
|
7817
7056
|
}
|
|
7818
7057
|
};
|
|
7819
7058
|
|
|
7820
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
7059
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/streaming.js
|
|
7821
7060
|
var DEFAULT_THROTTLE_MS = 500;
|
|
7822
7061
|
var MIN_THROTTLE_MS = 300;
|
|
7823
7062
|
var MAX_FLUSH_RETRIES = 3;
|
|
@@ -7985,7 +7224,7 @@ var StreamSession = class {
|
|
|
7985
7224
|
}
|
|
7986
7225
|
};
|
|
7987
7226
|
|
|
7988
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
7227
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/QQBot.js
|
|
7989
7228
|
var MsgType = {
|
|
7990
7229
|
/** Plain text. */
|
|
7991
7230
|
TEXT: 0,
|
|
@@ -8673,7 +7912,7 @@ var QQBot = class {
|
|
|
8673
7912
|
}
|
|
8674
7913
|
};
|
|
8675
7914
|
|
|
8676
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
7915
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/middleware/message-filter.js
|
|
8677
7916
|
function messageFilter(options = {}) {
|
|
8678
7917
|
const skipSelfEcho = options.skipSelfEcho ?? true;
|
|
8679
7918
|
const dedupOpts = options.dedup !== false ? { windowMs: 5e3, maxSize: 1e3, ...options.dedup ?? {} } : null;
|
|
@@ -8711,7 +7950,7 @@ function messageFilter(options = {}) {
|
|
|
8711
7950
|
};
|
|
8712
7951
|
}
|
|
8713
7952
|
|
|
8714
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
7953
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/middleware/content-sanitizer.js
|
|
8715
7954
|
function contentSanitizer(options = {}) {
|
|
8716
7955
|
const { stripBotMention = true, stripAllMentions = false, collapseWhitespace = false, parseFaceTags: parseFaceTags2 = false, transform } = options;
|
|
8717
7956
|
return async (ctx, next) => {
|
|
@@ -8806,7 +8045,7 @@ function faceToEmoji(id) {
|
|
|
8806
8045
|
return map[id];
|
|
8807
8046
|
}
|
|
8808
8047
|
|
|
8809
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
8048
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/middleware/rate-limiter.js
|
|
8810
8049
|
var SlidingWindow = class {
|
|
8811
8050
|
buckets = /* @__PURE__ */ new Map();
|
|
8812
8051
|
max;
|
|
@@ -8860,7 +8099,7 @@ function rateLimiter(options = {}) {
|
|
|
8860
8099
|
};
|
|
8861
8100
|
}
|
|
8862
8101
|
|
|
8863
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
8102
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/middleware/concurrency-guard.js
|
|
8864
8103
|
function concurrencyGuard(options = {}) {
|
|
8865
8104
|
const strategy = options.strategy ?? "queue";
|
|
8866
8105
|
const maxQueue = options.maxQueue ?? 3;
|
|
@@ -9064,7 +8303,7 @@ function concurrencyGuard(options = {}) {
|
|
|
9064
8303
|
return guard;
|
|
9065
8304
|
}
|
|
9066
8305
|
|
|
9067
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
8306
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/middleware/mention-gate.js
|
|
9068
8307
|
function detectMentionInContent(content, appId) {
|
|
9069
8308
|
if (!content || !appId)
|
|
9070
8309
|
return false;
|
|
@@ -9120,7 +8359,7 @@ function mentionGate(options = {}) {
|
|
|
9120
8359
|
};
|
|
9121
8360
|
}
|
|
9122
8361
|
|
|
9123
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
8362
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/middleware/quote-ref.js
|
|
9124
8363
|
var MemoryRefIndexStore = class {
|
|
9125
8364
|
map = /* @__PURE__ */ new Map();
|
|
9126
8365
|
maxSize;
|
|
@@ -9238,7 +8477,7 @@ function buildText(content, attachments) {
|
|
|
9238
8477
|
return parts.join("\n") || "[empty message]";
|
|
9239
8478
|
}
|
|
9240
8479
|
|
|
9241
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
8480
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/middleware/envelope-formatter.js
|
|
9242
8481
|
function envelopeFormatter(options = {}) {
|
|
9243
8482
|
const { historyLimit = 5, includeQuote = true, includeSender = true, format } = options;
|
|
9244
8483
|
return async (ctx, next) => {
|
|
@@ -9310,7 +8549,7 @@ ${parts.join("\n")}
|
|
|
9310
8549
|
return sections.join("\n\n");
|
|
9311
8550
|
}
|
|
9312
8551
|
|
|
9313
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
8552
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/middleware/slash-command.js
|
|
9314
8553
|
function slashCommand(options = {}) {
|
|
9315
8554
|
const prefixes = options.prefixes ?? ["/"];
|
|
9316
8555
|
const catchErrors = options.catchErrors ?? true;
|
|
@@ -9462,7 +8701,7 @@ async function sendCommandResult(ctx, result) {
|
|
|
9462
8701
|
}
|
|
9463
8702
|
}
|
|
9464
8703
|
|
|
9465
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
8704
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/middleware/history-buffer.js
|
|
9466
8705
|
var MemoryHistoryStore = class {
|
|
9467
8706
|
buffers = /* @__PURE__ */ new Map();
|
|
9468
8707
|
append(groupKey, entry, limit) {
|
|
@@ -9527,7 +8766,7 @@ function historyBuffer(options = {}) {
|
|
|
9527
8766
|
return m3;
|
|
9528
8767
|
}
|
|
9529
8768
|
|
|
9530
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
8769
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/middleware/typing-indicator.js
|
|
9531
8770
|
var DEFAULT_DURATION_SEC = 60;
|
|
9532
8771
|
var DEFAULT_KEEPALIVE_INTERVAL_MS = 5e4;
|
|
9533
8772
|
function typingIndicator(options = {}) {
|
|
@@ -9564,7 +8803,7 @@ function typingIndicator(options = {}) {
|
|
|
9564
8803
|
};
|
|
9565
8804
|
}
|
|
9566
8805
|
|
|
9567
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
8806
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/middleware/error-handler.js
|
|
9568
8807
|
var DEFAULT_FORMAT = (err) => {
|
|
9569
8808
|
if (err instanceof ApiError) {
|
|
9570
8809
|
if (err.bizMessage)
|
|
@@ -9602,7 +8841,7 @@ function errorHandler(options = {}) {
|
|
|
9602
8841
|
};
|
|
9603
8842
|
}
|
|
9604
8843
|
|
|
9605
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
8844
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/storage/kv-store.js
|
|
9606
8845
|
var import_node_fs = __toESM(require("fs"), 1);
|
|
9607
8846
|
var import_node_path = __toESM(require("path"), 1);
|
|
9608
8847
|
var FileKVStore = class {
|
|
@@ -9712,7 +8951,7 @@ var FileKVStore = class {
|
|
|
9712
8951
|
}
|
|
9713
8952
|
};
|
|
9714
8953
|
|
|
9715
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
8954
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/storage/session-adapter.js
|
|
9716
8955
|
function kvSessionPersistence(opts) {
|
|
9717
8956
|
const prefix = opts.prefix ?? "qqbot:session:";
|
|
9718
8957
|
const key = `${prefix}${opts.accountId}`;
|
|
@@ -11861,10 +11100,10 @@ function buildCommandList(account, opts) {
|
|
|
11861
11100
|
// src/middleware/attachment.ts
|
|
11862
11101
|
var path16 = __toESM(require("path"), 1);
|
|
11863
11102
|
|
|
11864
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
11103
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/utils/reply-limiter.js
|
|
11865
11104
|
var DEFAULT_TTL_MS = 60 * 60 * 1e3;
|
|
11866
11105
|
|
|
11867
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
11106
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/utils/media-tags.js
|
|
11868
11107
|
var VALID_TAGS = ["qqimg", "qqvoice", "qqvideo", "qqfile", "qqmedia"];
|
|
11869
11108
|
var TAG_ALIASES = {
|
|
11870
11109
|
qq_img: "qqimg",
|
|
@@ -11913,30 +11152,30 @@ var SELF_CLOSING_TAG_REGEX = new RegExp("`?" + LEFT_BRACKET + "\\s*(" + TAG_NAME
|
|
|
11913
11152
|
var FUZZY_MEDIA_TAG_REGEX = new RegExp("`?" + LEFT_BRACKET + "\\s*(" + TAG_NAME_PATTERN + ")\\s*" + RIGHT_BRACKET + `["']?\\s*([^<\uFF1C<\uFF1E>"'\`]+?)\\s*["']?` + LEFT_BRACKET + "\\s*/?\\s*(?:" + TAG_NAME_PATTERN + ")\\s*" + RIGHT_BRACKET + "`?", "gi");
|
|
11914
11153
|
var MULTILINE_TAG_CLEANUP = new RegExp("(" + LEFT_BRACKET + "\\s*(?:" + TAG_NAME_PATTERN + ")\\s*" + RIGHT_BRACKET + ")([\\s\\S]*?)(" + LEFT_BRACKET + "\\s*/?\\s*(?:" + TAG_NAME_PATTERN + ")\\s*" + RIGHT_BRACKET + ")", "gi");
|
|
11915
11154
|
|
|
11916
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
11155
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/utils/ref-index-store.js
|
|
11917
11156
|
var import_node_fs6 = __toESM(require("fs"), 1);
|
|
11918
11157
|
var DEFAULT_TTL_MS2 = 7 * 24 * 60 * 60 * 1e3;
|
|
11919
11158
|
|
|
11920
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
11159
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/utils/session-store.js
|
|
11921
11160
|
var import_node_fs7 = __toESM(require("fs"), 1);
|
|
11922
11161
|
var import_node_path7 = __toESM(require("path"), 1);
|
|
11923
11162
|
var DEFAULT_EXPIRE_MS = 5 * 60 * 1e3;
|
|
11924
11163
|
|
|
11925
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
11164
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/utils/text-parsing.js
|
|
11926
11165
|
var MAX_FACE_EXT_BYTES = 64 * 1024;
|
|
11927
11166
|
|
|
11928
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
11167
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/utils/media-source.js
|
|
11929
11168
|
var fs14 = __toESM(require("fs"), 1);
|
|
11930
11169
|
|
|
11931
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
11170
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/utils/image-size.js
|
|
11932
11171
|
var import_node_buffer = require("buffer");
|
|
11933
11172
|
|
|
11934
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
11173
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/utils/ffmpeg.js
|
|
11935
11174
|
var import_node_child_process = require("child_process");
|
|
11936
11175
|
var fs15 = __toESM(require("fs"), 1);
|
|
11937
11176
|
var path13 = __toESM(require("path"), 1);
|
|
11938
11177
|
|
|
11939
|
-
// node_modules/.pnpm/@tencent+qqbot-nodejs@
|
|
11178
|
+
// node_modules/.pnpm/@tencent-connect+qqbot-nodejs@file+..+qqbot-nodejs/node_modules/@tencent-connect/qqbot-nodejs/dist/protocol/utils/audio.js
|
|
11940
11179
|
var import_node_child_process2 = require("child_process");
|
|
11941
11180
|
var fs16 = __toESM(require("fs"), 1);
|
|
11942
11181
|
var path14 = __toESM(require("path"), 1);
|
|
@@ -11947,7 +11186,7 @@ function loadSilkWasm() {
|
|
|
11947
11186
|
}
|
|
11948
11187
|
_silkWasmPromise = (async () => {
|
|
11949
11188
|
try {
|
|
11950
|
-
const mod = await
|
|
11189
|
+
const mod = await import("silk-wasm");
|
|
11951
11190
|
return mod;
|
|
11952
11191
|
} catch {
|
|
11953
11192
|
return null;
|
|
@@ -14836,8 +14075,8 @@ function createOutLog(accountId) {
|
|
|
14836
14075
|
return gwLog?.child("outbound") ?? {};
|
|
14837
14076
|
}
|
|
14838
14077
|
|
|
14839
|
-
// src/tools/
|
|
14840
|
-
var
|
|
14078
|
+
// src/tools/channel.ts
|
|
14079
|
+
var ChannelApiSchema = {
|
|
14841
14080
|
type: "object",
|
|
14842
14081
|
properties: {
|
|
14843
14082
|
method: {
|
|
@@ -14847,7 +14086,7 @@ var PlatformApiSchema = {
|
|
|
14847
14086
|
},
|
|
14848
14087
|
path: {
|
|
14849
14088
|
type: "string",
|
|
14850
|
-
description: "API \u8DEF\u5F84\uFF08\u4E0D\u542B\u57DF\u540D\uFF09\uFF0C\u5360\u4F4D\u7B26\u9700\u66FF\u6362\u4E3A\u5B9E\u9645\u503C\u3002\u793A\u4F8B\uFF1A/users/@me/guilds, /guilds/{guild_id}/channels, /
|
|
14089
|
+
description: "API \u8DEF\u5F84\uFF08\u4E0D\u542B\u57DF\u540D\uFF09\uFF0C\u5360\u4F4D\u7B26\u9700\u66FF\u6362\u4E3A\u5B9E\u9645\u503C\u3002\u793A\u4F8B\uFF1A/users/@me/guilds, /guilds/{guild_id}/channels, /channels/{channel_id}"
|
|
14851
14090
|
},
|
|
14852
14091
|
body: {
|
|
14853
14092
|
type: "object",
|
|
@@ -14875,17 +14114,20 @@ function validatePath(path20) {
|
|
|
14875
14114
|
}
|
|
14876
14115
|
return null;
|
|
14877
14116
|
}
|
|
14878
|
-
function
|
|
14117
|
+
function registerChannelTool(api) {
|
|
14879
14118
|
const cfg = api.config;
|
|
14880
14119
|
if (!cfg) return;
|
|
14881
14120
|
const accountIds = listQQBotAccountIds(cfg);
|
|
14882
14121
|
if (accountIds.length === 0) return;
|
|
14122
|
+
const firstAccountId = accountIds[0];
|
|
14123
|
+
const account = resolveQQBotAccount(cfg, firstAccountId);
|
|
14124
|
+
if (!account.appId || !account.clientSecret) return;
|
|
14883
14125
|
api.registerTool(
|
|
14884
14126
|
{
|
|
14885
|
-
name: "
|
|
14886
|
-
label: "QQBot
|
|
14887
|
-
description: "QQ \u5F00\u653E\u5E73\u53F0\
|
|
14888
|
-
parameters:
|
|
14127
|
+
name: "qqbot_channel_api",
|
|
14128
|
+
label: "QQBot Channel API",
|
|
14129
|
+
description: "QQ \u5F00\u653E\u5E73\u53F0\u9891\u9053 API HTTP \u4EE3\u7406\uFF0C\u81EA\u52A8\u586B\u5145\u9274\u6743 Token\u3002\u5E38\u7528\u63A5\u53E3\u901F\u67E5\uFF1A\u9891\u9053\u5217\u8868 GET /users/@me/guilds | \u5B50\u9891\u9053\u5217\u8868 GET /guilds/{guild_id}/channels | \u5B50\u9891\u9053\u8BE6\u60C5 GET /channels/{channel_id} | \u521B\u5EFA\u5B50\u9891\u9053 POST /guilds/{guild_id}/channels | \u6210\u5458\u5217\u8868 GET /guilds/{guild_id}/members?after=0&limit=100 | \u6210\u5458\u8BE6\u60C5 GET /guilds/{guild_id}/members/{user_id} | \u5E16\u5B50\u5217\u8868 GET /channels/{channel_id}/threads | \u53D1\u5E16 PUT /channels/{channel_id}/threads | \u521B\u5EFA\u516C\u544A POST /guilds/{guild_id}/announces | \u521B\u5EFA\u65E5\u7A0B POST /channels/{channel_id}/schedules\u3002\u66F4\u591A\u63A5\u53E3\u548C\u53C2\u6570\u8BE6\u60C5\u8BF7\u9605\u8BFB qqbot-channel skill\u3002",
|
|
14130
|
+
parameters: ChannelApiSchema,
|
|
14889
14131
|
async execute(_toolCallId, params) {
|
|
14890
14132
|
const p2 = params;
|
|
14891
14133
|
if (!p2.method) return json({ error: "method \u4E3A\u5FC5\u586B\u53C2\u6570" });
|
|
@@ -14896,12 +14138,8 @@ function registerPlatformTool(api) {
|
|
|
14896
14138
|
}
|
|
14897
14139
|
const pathError = validatePath(p2.path);
|
|
14898
14140
|
if (pathError) return json({ error: pathError });
|
|
14899
|
-
const accountId = getRequestAccountId();
|
|
14900
|
-
if (!accountId) {
|
|
14901
|
-
return json({ error: "\u65E0\u6CD5\u83B7\u53D6\u5F53\u524D\u8BF7\u6C42\u7684\u8D26\u53F7\u4FE1\u606F\uFF0C\u6B64\u5DE5\u5177\u4EC5\u652F\u6301\u5728\u6D88\u606F\u4F1A\u8BDD\u4E2D\u4F7F\u7528" });
|
|
14902
|
-
}
|
|
14903
14141
|
try {
|
|
14904
|
-
const bot = getBotForAccount(accountId);
|
|
14142
|
+
const bot = getBotForAccount(account.accountId);
|
|
14905
14143
|
const apiGateway = bot.api;
|
|
14906
14144
|
let data;
|
|
14907
14145
|
switch (method) {
|
|
@@ -14934,7 +14172,7 @@ function registerPlatformTool(api) {
|
|
|
14934
14172
|
}
|
|
14935
14173
|
}
|
|
14936
14174
|
},
|
|
14937
|
-
{ name: "
|
|
14175
|
+
{ name: "qqbot_channel_api" }
|
|
14938
14176
|
);
|
|
14939
14177
|
}
|
|
14940
14178
|
|
|
@@ -15227,7 +14465,7 @@ var plugin = {
|
|
|
15227
14465
|
}
|
|
15228
14466
|
}
|
|
15229
14467
|
api.registerChannel({ plugin: qqbotPlugin });
|
|
15230
|
-
|
|
14468
|
+
registerChannelTool(api);
|
|
15231
14469
|
registerRemindTool(api);
|
|
15232
14470
|
}
|
|
15233
14471
|
};
|