@ycodium-ai/plugin-im 0.2.2966 → 0.2.2968
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/README.md +7 -5
- package/dist/index.js +1250 -980
- package/locales/en.json +5 -1
- package/locales/zh-CN.json +5 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -97,17 +97,17 @@ var require_punycode = __commonJS({
|
|
|
97
97
|
let counter = 0;
|
|
98
98
|
const length = string.length;
|
|
99
99
|
while (counter < length) {
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
100
|
+
const value2 = string.charCodeAt(counter++);
|
|
101
|
+
if (value2 >= 55296 && value2 <= 56319 && counter < length) {
|
|
102
102
|
const extra = string.charCodeAt(counter++);
|
|
103
103
|
if ((extra & 64512) == 56320) {
|
|
104
|
-
output.push(((
|
|
104
|
+
output.push(((value2 & 1023) << 10) + (extra & 1023) + 65536);
|
|
105
105
|
} else {
|
|
106
|
-
output.push(
|
|
106
|
+
output.push(value2);
|
|
107
107
|
counter--;
|
|
108
108
|
}
|
|
109
109
|
} else {
|
|
110
|
-
output.push(
|
|
110
|
+
output.push(value2);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
return output;
|
|
@@ -474,8 +474,8 @@ var require_combined_stream = __commonJS({
|
|
|
474
474
|
stream.pipe(this, { end: false });
|
|
475
475
|
return;
|
|
476
476
|
}
|
|
477
|
-
var
|
|
478
|
-
this.write(
|
|
477
|
+
var value2 = stream;
|
|
478
|
+
this.write(value2);
|
|
479
479
|
this._getNext();
|
|
480
480
|
};
|
|
481
481
|
CombinedStream.prototype._handleErrors = function(stream) {
|
|
@@ -9809,8 +9809,8 @@ var require_get = __commonJS({
|
|
|
9809
9809
|
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
9810
9810
|
module.exports = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
|
|
9811
9811
|
/** @type {import('./get')} */
|
|
9812
|
-
function getDunder(
|
|
9813
|
-
return $getPrototypeOf(
|
|
9812
|
+
function getDunder(value2) {
|
|
9813
|
+
return $getPrototypeOf(value2 == null ? value2 : $Object(value2));
|
|
9814
9814
|
}
|
|
9815
9815
|
) : false;
|
|
9816
9816
|
}
|
|
@@ -9993,26 +9993,26 @@ var require_get_intrinsic = __commonJS({
|
|
|
9993
9993
|
}
|
|
9994
9994
|
var errorProto;
|
|
9995
9995
|
var doEval = function doEval2(name) {
|
|
9996
|
-
var
|
|
9996
|
+
var value2;
|
|
9997
9997
|
if (name === "%AsyncFunction%") {
|
|
9998
|
-
|
|
9998
|
+
value2 = getEvalledConstructor("async function () {}");
|
|
9999
9999
|
} else if (name === "%GeneratorFunction%") {
|
|
10000
|
-
|
|
10000
|
+
value2 = getEvalledConstructor("function* () {}");
|
|
10001
10001
|
} else if (name === "%AsyncGeneratorFunction%") {
|
|
10002
|
-
|
|
10002
|
+
value2 = getEvalledConstructor("async function* () {}");
|
|
10003
10003
|
} else if (name === "%AsyncGenerator%") {
|
|
10004
10004
|
var fn = doEval2("%AsyncGeneratorFunction%");
|
|
10005
10005
|
if (fn) {
|
|
10006
|
-
|
|
10006
|
+
value2 = fn.prototype;
|
|
10007
10007
|
}
|
|
10008
10008
|
} else if (name === "%AsyncIteratorPrototype%") {
|
|
10009
10009
|
var gen = doEval2("%AsyncGenerator%");
|
|
10010
10010
|
if (gen && getProto) {
|
|
10011
|
-
|
|
10011
|
+
value2 = getProto(gen.prototype);
|
|
10012
10012
|
}
|
|
10013
10013
|
}
|
|
10014
|
-
INTRINSICS[name] =
|
|
10015
|
-
return
|
|
10014
|
+
INTRINSICS[name] = value2;
|
|
10015
|
+
return value2;
|
|
10016
10016
|
};
|
|
10017
10017
|
var LEGACY_ALIASES = {
|
|
10018
10018
|
__proto__: null,
|
|
@@ -10099,17 +10099,17 @@ var require_get_intrinsic = __commonJS({
|
|
|
10099
10099
|
intrinsicName = "%" + alias[0] + "%";
|
|
10100
10100
|
}
|
|
10101
10101
|
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
10102
|
-
var
|
|
10103
|
-
if (
|
|
10104
|
-
|
|
10102
|
+
var value2 = INTRINSICS[intrinsicName];
|
|
10103
|
+
if (value2 === needsEval) {
|
|
10104
|
+
value2 = doEval(intrinsicName);
|
|
10105
10105
|
}
|
|
10106
|
-
if (typeof
|
|
10106
|
+
if (typeof value2 === "undefined" && !allowMissing) {
|
|
10107
10107
|
throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
|
|
10108
10108
|
}
|
|
10109
10109
|
return {
|
|
10110
10110
|
alias,
|
|
10111
10111
|
name: intrinsicName,
|
|
10112
|
-
value
|
|
10112
|
+
value: value2
|
|
10113
10113
|
};
|
|
10114
10114
|
}
|
|
10115
10115
|
throw new $SyntaxError("intrinsic " + name + " does not exist!");
|
|
@@ -10128,7 +10128,7 @@ var require_get_intrinsic = __commonJS({
|
|
|
10128
10128
|
var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
|
|
10129
10129
|
var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
|
|
10130
10130
|
var intrinsicRealName = intrinsic.name;
|
|
10131
|
-
var
|
|
10131
|
+
var value2 = intrinsic.value;
|
|
10132
10132
|
var skipFurtherCaching = false;
|
|
10133
10133
|
var alias = intrinsic.alias;
|
|
10134
10134
|
if (alias) {
|
|
@@ -10148,32 +10148,32 @@ var require_get_intrinsic = __commonJS({
|
|
|
10148
10148
|
intrinsicBaseName += "." + part;
|
|
10149
10149
|
intrinsicRealName = "%" + intrinsicBaseName + "%";
|
|
10150
10150
|
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
10151
|
-
|
|
10152
|
-
} else if (
|
|
10153
|
-
if (!(part in
|
|
10151
|
+
value2 = INTRINSICS[intrinsicRealName];
|
|
10152
|
+
} else if (value2 != null) {
|
|
10153
|
+
if (!(part in value2)) {
|
|
10154
10154
|
if (!allowMissing) {
|
|
10155
10155
|
throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
|
|
10156
10156
|
}
|
|
10157
10157
|
return void undefined2;
|
|
10158
10158
|
}
|
|
10159
10159
|
if ($gOPD && i + 1 >= parts.length) {
|
|
10160
|
-
var desc = $gOPD(
|
|
10160
|
+
var desc = $gOPD(value2, part);
|
|
10161
10161
|
isOwn = !!desc;
|
|
10162
10162
|
if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
|
|
10163
|
-
|
|
10163
|
+
value2 = desc.get;
|
|
10164
10164
|
} else {
|
|
10165
|
-
|
|
10165
|
+
value2 = value2[part];
|
|
10166
10166
|
}
|
|
10167
10167
|
} else {
|
|
10168
|
-
isOwn = hasOwn(
|
|
10169
|
-
|
|
10168
|
+
isOwn = hasOwn(value2, part);
|
|
10169
|
+
value2 = value2[part];
|
|
10170
10170
|
}
|
|
10171
10171
|
if (isOwn && !skipFurtherCaching) {
|
|
10172
|
-
INTRINSICS[intrinsicRealName] =
|
|
10172
|
+
INTRINSICS[intrinsicRealName] = value2;
|
|
10173
10173
|
}
|
|
10174
10174
|
}
|
|
10175
10175
|
}
|
|
10176
|
-
return
|
|
10176
|
+
return value2;
|
|
10177
10177
|
};
|
|
10178
10178
|
}
|
|
10179
10179
|
});
|
|
@@ -10199,7 +10199,7 @@ var require_es_set_tostringtag = __commonJS({
|
|
|
10199
10199
|
var hasOwn = require_hasown();
|
|
10200
10200
|
var $TypeError = require_type();
|
|
10201
10201
|
var toStringTag = hasToStringTag ? Symbol.toStringTag : null;
|
|
10202
|
-
module.exports = function setToStringTag(object,
|
|
10202
|
+
module.exports = function setToStringTag(object, value2) {
|
|
10203
10203
|
var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
|
|
10204
10204
|
var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
|
|
10205
10205
|
if (typeof overrideIfSet !== "undefined" && typeof overrideIfSet !== "boolean" || typeof nonConfigurable !== "undefined" && typeof nonConfigurable !== "boolean") {
|
|
@@ -10210,11 +10210,11 @@ var require_es_set_tostringtag = __commonJS({
|
|
|
10210
10210
|
$defineProperty(object, toStringTag, {
|
|
10211
10211
|
configurable: !nonConfigurable,
|
|
10212
10212
|
enumerable: false,
|
|
10213
|
-
value,
|
|
10213
|
+
value: value2,
|
|
10214
10214
|
writable: false
|
|
10215
10215
|
});
|
|
10216
10216
|
} else {
|
|
10217
|
-
object[toStringTag] =
|
|
10217
|
+
object[toStringTag] = value2;
|
|
10218
10218
|
}
|
|
10219
10219
|
}
|
|
10220
10220
|
};
|
|
@@ -10271,76 +10271,76 @@ var require_form_data = __commonJS({
|
|
|
10271
10271
|
util.inherits(FormData2, CombinedStream);
|
|
10272
10272
|
FormData2.LINE_BREAK = "\r\n";
|
|
10273
10273
|
FormData2.DEFAULT_CONTENT_TYPE = "application/octet-stream";
|
|
10274
|
-
FormData2.prototype.append = function(field,
|
|
10274
|
+
FormData2.prototype.append = function(field, value2, options) {
|
|
10275
10275
|
options = options || {};
|
|
10276
10276
|
if (typeof options === "string") {
|
|
10277
10277
|
options = { filename: options };
|
|
10278
10278
|
}
|
|
10279
10279
|
var append = CombinedStream.prototype.append.bind(this);
|
|
10280
|
-
if (typeof
|
|
10281
|
-
|
|
10280
|
+
if (typeof value2 === "number" || value2 == null) {
|
|
10281
|
+
value2 = String(value2);
|
|
10282
10282
|
}
|
|
10283
|
-
if (Array.isArray(
|
|
10283
|
+
if (Array.isArray(value2)) {
|
|
10284
10284
|
this._error(new Error("Arrays are not supported."));
|
|
10285
10285
|
return;
|
|
10286
10286
|
}
|
|
10287
|
-
var header = this._multiPartHeader(field,
|
|
10287
|
+
var header = this._multiPartHeader(field, value2, options);
|
|
10288
10288
|
var footer = this._multiPartFooter();
|
|
10289
10289
|
append(header);
|
|
10290
|
-
append(
|
|
10290
|
+
append(value2);
|
|
10291
10291
|
append(footer);
|
|
10292
|
-
this._trackLength(header,
|
|
10292
|
+
this._trackLength(header, value2, options);
|
|
10293
10293
|
};
|
|
10294
|
-
FormData2.prototype._trackLength = function(header,
|
|
10294
|
+
FormData2.prototype._trackLength = function(header, value2, options) {
|
|
10295
10295
|
var valueLength = 0;
|
|
10296
10296
|
if (options.knownLength != null) {
|
|
10297
10297
|
valueLength += Number(options.knownLength);
|
|
10298
|
-
} else if (Buffer.isBuffer(
|
|
10299
|
-
valueLength =
|
|
10300
|
-
} else if (typeof
|
|
10301
|
-
valueLength = Buffer.byteLength(
|
|
10298
|
+
} else if (Buffer.isBuffer(value2)) {
|
|
10299
|
+
valueLength = value2.length;
|
|
10300
|
+
} else if (typeof value2 === "string") {
|
|
10301
|
+
valueLength = Buffer.byteLength(value2);
|
|
10302
10302
|
}
|
|
10303
10303
|
this._valueLength += valueLength;
|
|
10304
10304
|
this._overheadLength += Buffer.byteLength(header) + FormData2.LINE_BREAK.length;
|
|
10305
|
-
if (!
|
|
10305
|
+
if (!value2 || !value2.path && !(value2.readable && hasOwn(value2, "httpVersion")) && !(value2 instanceof Stream)) {
|
|
10306
10306
|
return;
|
|
10307
10307
|
}
|
|
10308
10308
|
if (!options.knownLength) {
|
|
10309
|
-
this._valuesToMeasure.push(
|
|
10309
|
+
this._valuesToMeasure.push(value2);
|
|
10310
10310
|
}
|
|
10311
10311
|
};
|
|
10312
|
-
FormData2.prototype._lengthRetriever = function(
|
|
10313
|
-
if (hasOwn(
|
|
10314
|
-
if (
|
|
10315
|
-
callback(null,
|
|
10312
|
+
FormData2.prototype._lengthRetriever = function(value2, callback) {
|
|
10313
|
+
if (hasOwn(value2, "fd")) {
|
|
10314
|
+
if (value2.end != void 0 && value2.end != Infinity && value2.start != void 0) {
|
|
10315
|
+
callback(null, value2.end + 1 - (value2.start ? value2.start : 0));
|
|
10316
10316
|
} else {
|
|
10317
|
-
fs.stat(
|
|
10317
|
+
fs.stat(value2.path, function(err, stat) {
|
|
10318
10318
|
if (err) {
|
|
10319
10319
|
callback(err);
|
|
10320
10320
|
return;
|
|
10321
10321
|
}
|
|
10322
|
-
var fileSize = stat.size - (
|
|
10322
|
+
var fileSize = stat.size - (value2.start ? value2.start : 0);
|
|
10323
10323
|
callback(null, fileSize);
|
|
10324
10324
|
});
|
|
10325
10325
|
}
|
|
10326
|
-
} else if (hasOwn(
|
|
10327
|
-
callback(null, Number(
|
|
10328
|
-
} else if (hasOwn(
|
|
10329
|
-
|
|
10330
|
-
|
|
10326
|
+
} else if (hasOwn(value2, "httpVersion")) {
|
|
10327
|
+
callback(null, Number(value2.headers["content-length"]));
|
|
10328
|
+
} else if (hasOwn(value2, "httpModule")) {
|
|
10329
|
+
value2.on("response", function(response) {
|
|
10330
|
+
value2.pause();
|
|
10331
10331
|
callback(null, Number(response.headers["content-length"]));
|
|
10332
10332
|
});
|
|
10333
|
-
|
|
10333
|
+
value2.resume();
|
|
10334
10334
|
} else {
|
|
10335
10335
|
callback("Unknown stream");
|
|
10336
10336
|
}
|
|
10337
10337
|
};
|
|
10338
|
-
FormData2.prototype._multiPartHeader = function(field,
|
|
10338
|
+
FormData2.prototype._multiPartHeader = function(field, value2, options) {
|
|
10339
10339
|
if (typeof options.header === "string") {
|
|
10340
10340
|
return options.header;
|
|
10341
10341
|
}
|
|
10342
|
-
var contentDisposition = this._getContentDisposition(
|
|
10343
|
-
var contentType = this._getContentType(
|
|
10342
|
+
var contentDisposition = this._getContentDisposition(value2, options);
|
|
10343
|
+
var contentType = this._getContentType(value2, options);
|
|
10344
10344
|
var contents = "";
|
|
10345
10345
|
var headers = {
|
|
10346
10346
|
// add custom disposition as third element or keep it two elements if not
|
|
@@ -10368,34 +10368,34 @@ var require_form_data = __commonJS({
|
|
|
10368
10368
|
}
|
|
10369
10369
|
return "--" + this.getBoundary() + FormData2.LINE_BREAK + contents + FormData2.LINE_BREAK;
|
|
10370
10370
|
};
|
|
10371
|
-
FormData2.prototype._getContentDisposition = function(
|
|
10371
|
+
FormData2.prototype._getContentDisposition = function(value2, options) {
|
|
10372
10372
|
var filename;
|
|
10373
10373
|
if (typeof options.filepath === "string") {
|
|
10374
10374
|
filename = path.normalize(options.filepath).replace(/\\/g, "/");
|
|
10375
|
-
} else if (options.filename ||
|
|
10376
|
-
filename = path.basename(options.filename ||
|
|
10377
|
-
} else if (
|
|
10378
|
-
filename = path.basename(
|
|
10375
|
+
} else if (options.filename || value2 && (value2.name || value2.path)) {
|
|
10376
|
+
filename = path.basename(options.filename || value2 && (value2.name || value2.path));
|
|
10377
|
+
} else if (value2 && value2.readable && hasOwn(value2, "httpVersion")) {
|
|
10378
|
+
filename = path.basename(value2.client._httpMessage.path || "");
|
|
10379
10379
|
}
|
|
10380
10380
|
if (filename) {
|
|
10381
10381
|
return 'filename="' + escapeHeaderParam(filename) + '"';
|
|
10382
10382
|
}
|
|
10383
10383
|
};
|
|
10384
|
-
FormData2.prototype._getContentType = function(
|
|
10384
|
+
FormData2.prototype._getContentType = function(value2, options) {
|
|
10385
10385
|
var contentType = options.contentType;
|
|
10386
|
-
if (!contentType &&
|
|
10387
|
-
contentType = mime.lookup(
|
|
10386
|
+
if (!contentType && value2 && value2.name) {
|
|
10387
|
+
contentType = mime.lookup(value2.name);
|
|
10388
10388
|
}
|
|
10389
|
-
if (!contentType &&
|
|
10390
|
-
contentType = mime.lookup(
|
|
10389
|
+
if (!contentType && value2 && value2.path) {
|
|
10390
|
+
contentType = mime.lookup(value2.path);
|
|
10391
10391
|
}
|
|
10392
|
-
if (!contentType &&
|
|
10393
|
-
contentType =
|
|
10392
|
+
if (!contentType && value2 && value2.readable && hasOwn(value2, "httpVersion")) {
|
|
10393
|
+
contentType = value2.headers["content-type"];
|
|
10394
10394
|
}
|
|
10395
10395
|
if (!contentType && (options.filepath || options.filename)) {
|
|
10396
10396
|
contentType = mime.lookup(options.filepath || options.filename);
|
|
10397
10397
|
}
|
|
10398
|
-
if (!contentType &&
|
|
10398
|
+
if (!contentType && value2 && typeof value2 === "object") {
|
|
10399
10399
|
contentType = FormData2.DEFAULT_CONTENT_TYPE;
|
|
10400
10400
|
}
|
|
10401
10401
|
return contentType;
|
|
@@ -11595,22 +11595,22 @@ var require_agent = __commonJS({
|
|
|
11595
11595
|
"../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js"(exports) {
|
|
11596
11596
|
"use strict";
|
|
11597
11597
|
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P2, generator) {
|
|
11598
|
-
function adopt(
|
|
11599
|
-
return
|
|
11600
|
-
resolve(
|
|
11598
|
+
function adopt(value2) {
|
|
11599
|
+
return value2 instanceof P2 ? value2 : new P2(function(resolve) {
|
|
11600
|
+
resolve(value2);
|
|
11601
11601
|
});
|
|
11602
11602
|
}
|
|
11603
11603
|
return new (P2 || (P2 = Promise))(function(resolve, reject) {
|
|
11604
|
-
function fulfilled(
|
|
11604
|
+
function fulfilled(value2) {
|
|
11605
11605
|
try {
|
|
11606
|
-
step(generator.next(
|
|
11606
|
+
step(generator.next(value2));
|
|
11607
11607
|
} catch (e) {
|
|
11608
11608
|
reject(e);
|
|
11609
11609
|
}
|
|
11610
11610
|
}
|
|
11611
|
-
function rejected(
|
|
11611
|
+
function rejected(value2) {
|
|
11612
11612
|
try {
|
|
11613
|
-
step(generator["throw"](
|
|
11613
|
+
step(generator["throw"](value2));
|
|
11614
11614
|
} catch (e) {
|
|
11615
11615
|
reject(e);
|
|
11616
11616
|
}
|
|
@@ -11943,9 +11943,9 @@ var require_follow_redirects = __commonJS({
|
|
|
11943
11943
|
this._ending = true;
|
|
11944
11944
|
}
|
|
11945
11945
|
};
|
|
11946
|
-
RedirectableRequest.prototype.setHeader = function(name,
|
|
11947
|
-
this._options.headers[name] =
|
|
11948
|
-
this._currentRequest.setHeader(name,
|
|
11946
|
+
RedirectableRequest.prototype.setHeader = function(name, value2) {
|
|
11947
|
+
this._options.headers[name] = value2;
|
|
11948
|
+
this._currentRequest.setHeader(name, value2);
|
|
11949
11949
|
};
|
|
11950
11950
|
RedirectableRequest.prototype.removeHeader = function(name) {
|
|
11951
11951
|
delete this._options.headers[name];
|
|
@@ -12277,20 +12277,20 @@ var require_follow_redirects = __commonJS({
|
|
|
12277
12277
|
var dot = subdomain.length - domain.length - 1;
|
|
12278
12278
|
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
|
|
12279
12279
|
}
|
|
12280
|
-
function isArray(
|
|
12281
|
-
return
|
|
12280
|
+
function isArray(value2) {
|
|
12281
|
+
return value2 instanceof Array;
|
|
12282
12282
|
}
|
|
12283
|
-
function isString(
|
|
12284
|
-
return typeof
|
|
12283
|
+
function isString(value2) {
|
|
12284
|
+
return typeof value2 === "string" || value2 instanceof String;
|
|
12285
12285
|
}
|
|
12286
|
-
function isFunction(
|
|
12287
|
-
return typeof
|
|
12286
|
+
function isFunction(value2) {
|
|
12287
|
+
return typeof value2 === "function";
|
|
12288
12288
|
}
|
|
12289
|
-
function isBuffer(
|
|
12290
|
-
return typeof
|
|
12289
|
+
function isBuffer(value2) {
|
|
12290
|
+
return typeof value2 === "object" && "length" in value2;
|
|
12291
12291
|
}
|
|
12292
|
-
function isURL(
|
|
12293
|
-
return URL2 &&
|
|
12292
|
+
function isURL(value2) {
|
|
12293
|
+
return URL2 && value2 instanceof URL2;
|
|
12294
12294
|
}
|
|
12295
12295
|
function escapeRegex(regex) {
|
|
12296
12296
|
return regex.replace(/[\]\\/()*+?.$]/g, "\\$&");
|
|
@@ -12464,8 +12464,8 @@ var require_axios = __commonJS({
|
|
|
12464
12464
|
};
|
|
12465
12465
|
var isDate = kindOfTest("Date");
|
|
12466
12466
|
var isFile = kindOfTest("File");
|
|
12467
|
-
var isReactNativeBlob = (
|
|
12468
|
-
return !!(
|
|
12467
|
+
var isReactNativeBlob = (value2) => {
|
|
12468
|
+
return !!(value2 && typeof value2.uri !== "undefined");
|
|
12469
12469
|
};
|
|
12470
12470
|
var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
|
|
12471
12471
|
var isBlob = kindOfTest("Blob");
|
|
@@ -12724,8 +12724,8 @@ var require_axios = __commonJS({
|
|
|
12724
12724
|
if (isFunction$1(obj) && ["arguments", "caller", "callee"].includes(name)) {
|
|
12725
12725
|
return false;
|
|
12726
12726
|
}
|
|
12727
|
-
const
|
|
12728
|
-
if (!isFunction$1(
|
|
12727
|
+
const value2 = obj[name];
|
|
12728
|
+
if (!isFunction$1(value2)) return;
|
|
12729
12729
|
descriptor.enumerable = false;
|
|
12730
12730
|
if ("writable" in descriptor) {
|
|
12731
12731
|
descriptor.writable = false;
|
|
@@ -12741,8 +12741,8 @@ var require_axios = __commonJS({
|
|
|
12741
12741
|
var toObjectSet = (arrayOrString, delimiter) => {
|
|
12742
12742
|
const obj = {};
|
|
12743
12743
|
const define2 = (arr) => {
|
|
12744
|
-
arr.forEach((
|
|
12745
|
-
obj[
|
|
12744
|
+
arr.forEach((value2) => {
|
|
12745
|
+
obj[value2] = true;
|
|
12746
12746
|
});
|
|
12747
12747
|
};
|
|
12748
12748
|
isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter));
|
|
@@ -12750,8 +12750,8 @@ var require_axios = __commonJS({
|
|
|
12750
12750
|
};
|
|
12751
12751
|
var noop = () => {
|
|
12752
12752
|
};
|
|
12753
|
-
var toFiniteNumber = (
|
|
12754
|
-
return
|
|
12753
|
+
var toFiniteNumber = (value2, defaultValue) => {
|
|
12754
|
+
return value2 != null && Number.isFinite(value2 = +value2) ? value2 : defaultValue;
|
|
12755
12755
|
};
|
|
12756
12756
|
function isSpecCompliantForm(thing) {
|
|
12757
12757
|
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
|
|
@@ -12771,14 +12771,14 @@ var require_axios = __commonJS({
|
|
|
12771
12771
|
let target;
|
|
12772
12772
|
if (isSet(source)) {
|
|
12773
12773
|
target = [];
|
|
12774
|
-
for (const
|
|
12775
|
-
const reducedValue = visit(
|
|
12774
|
+
for (const value2 of source) {
|
|
12775
|
+
const reducedValue = visit(value2);
|
|
12776
12776
|
!isUndefined(reducedValue) && target.push(reducedValue);
|
|
12777
12777
|
}
|
|
12778
12778
|
} else {
|
|
12779
12779
|
target = isArray(source) ? [] : {};
|
|
12780
|
-
forEach(source, (
|
|
12781
|
-
const reducedValue = visit(
|
|
12780
|
+
forEach(source, (value2, key) => {
|
|
12781
|
+
const reducedValue = visit(value2);
|
|
12782
12782
|
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
12783
12783
|
});
|
|
12784
12784
|
}
|
|
@@ -12927,18 +12927,18 @@ var require_axios = __commonJS({
|
|
|
12927
12927
|
}
|
|
12928
12928
|
var INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g");
|
|
12929
12929
|
var INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
12930
|
-
function sanitizeValue(
|
|
12931
|
-
if (utils$1.isArray(
|
|
12932
|
-
return
|
|
12930
|
+
function sanitizeValue(value2, invalidChars) {
|
|
12931
|
+
if (utils$1.isArray(value2)) {
|
|
12932
|
+
return value2.map((item) => sanitizeValue(item, invalidChars));
|
|
12933
12933
|
}
|
|
12934
|
-
return trimSPorHTAB(String(
|
|
12934
|
+
return trimSPorHTAB(String(value2).replace(invalidChars, ""));
|
|
12935
12935
|
}
|
|
12936
|
-
var sanitizeHeaderValue = (
|
|
12937
|
-
var sanitizeByteStringHeaderValue = (
|
|
12936
|
+
var sanitizeHeaderValue = (value2) => sanitizeValue(value2, INVALID_UNICODE_HEADER_VALUE_CHARS);
|
|
12937
|
+
var sanitizeByteStringHeaderValue = (value2) => sanitizeValue(value2, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);
|
|
12938
12938
|
function toByteStringHeaderObject(headers) {
|
|
12939
12939
|
const byteStringHeaders = /* @__PURE__ */ Object.create(null);
|
|
12940
|
-
utils$1.forEach(headers.toJSON(), (
|
|
12941
|
-
byteStringHeaders[header] = sanitizeByteStringHeaderValue(
|
|
12940
|
+
utils$1.forEach(headers.toJSON(), (value2, header) => {
|
|
12941
|
+
byteStringHeaders[header] = sanitizeByteStringHeaderValue(value2);
|
|
12942
12942
|
});
|
|
12943
12943
|
return byteStringHeaders;
|
|
12944
12944
|
}
|
|
@@ -12946,11 +12946,11 @@ var require_axios = __commonJS({
|
|
|
12946
12946
|
function normalizeHeader(header) {
|
|
12947
12947
|
return header && String(header).trim().toLowerCase();
|
|
12948
12948
|
}
|
|
12949
|
-
function normalizeValue(
|
|
12950
|
-
if (
|
|
12951
|
-
return
|
|
12949
|
+
function normalizeValue(value2) {
|
|
12950
|
+
if (value2 === false || value2 == null) {
|
|
12951
|
+
return value2;
|
|
12952
12952
|
}
|
|
12953
|
-
return utils$1.isArray(
|
|
12953
|
+
return utils$1.isArray(value2) ? value2.map(normalizeValue) : sanitizeHeaderValue(String(value2));
|
|
12954
12954
|
}
|
|
12955
12955
|
function parseTokens(str2) {
|
|
12956
12956
|
const tokens = /* @__PURE__ */ Object.create(null);
|
|
@@ -12962,49 +12962,49 @@ var require_axios = __commonJS({
|
|
|
12962
12962
|
return tokens;
|
|
12963
12963
|
}
|
|
12964
12964
|
var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
12965
|
-
function trimOWS(
|
|
12965
|
+
function trimOWS(value2) {
|
|
12966
12966
|
let start = 0;
|
|
12967
|
-
let end =
|
|
12967
|
+
let end = value2.length;
|
|
12968
12968
|
while (start < end) {
|
|
12969
|
-
const code2 =
|
|
12969
|
+
const code2 = value2.charCodeAt(start);
|
|
12970
12970
|
if (code2 !== 9 && code2 !== 32) {
|
|
12971
12971
|
break;
|
|
12972
12972
|
}
|
|
12973
12973
|
start += 1;
|
|
12974
12974
|
}
|
|
12975
12975
|
while (end > start) {
|
|
12976
|
-
const code2 =
|
|
12976
|
+
const code2 = value2.charCodeAt(end - 1);
|
|
12977
12977
|
if (code2 !== 9 && code2 !== 32) {
|
|
12978
12978
|
break;
|
|
12979
12979
|
}
|
|
12980
12980
|
end -= 1;
|
|
12981
12981
|
}
|
|
12982
|
-
return start === 0 && end ===
|
|
12982
|
+
return start === 0 && end === value2.length ? value2 : value2.slice(start, end);
|
|
12983
12983
|
}
|
|
12984
|
-
function decodeQuotedString(
|
|
12985
|
-
const last =
|
|
12986
|
-
if (last < 1 ||
|
|
12987
|
-
return
|
|
12984
|
+
function decodeQuotedString(value2) {
|
|
12985
|
+
const last = value2.length - 1;
|
|
12986
|
+
if (last < 1 || value2.charCodeAt(0) !== 34 || value2.charCodeAt(last) !== 34) {
|
|
12987
|
+
return value2;
|
|
12988
12988
|
}
|
|
12989
12989
|
let decoded = "";
|
|
12990
12990
|
for (let i = 1; i < last; i++) {
|
|
12991
|
-
const code2 =
|
|
12991
|
+
const code2 = value2.charCodeAt(i);
|
|
12992
12992
|
if (code2 === 34) {
|
|
12993
|
-
return
|
|
12993
|
+
return value2;
|
|
12994
12994
|
}
|
|
12995
12995
|
if (code2 === 92) {
|
|
12996
12996
|
i += 1;
|
|
12997
12997
|
if (i >= last) {
|
|
12998
|
-
return
|
|
12998
|
+
return value2;
|
|
12999
12999
|
}
|
|
13000
13000
|
}
|
|
13001
|
-
decoded +=
|
|
13001
|
+
decoded += value2[i];
|
|
13002
13002
|
}
|
|
13003
13003
|
return decoded;
|
|
13004
13004
|
}
|
|
13005
|
-
function parseParameters(
|
|
13005
|
+
function parseParameters(value2) {
|
|
13006
13006
|
const parameters = /* @__PURE__ */ Object.create(null);
|
|
13007
|
-
const str2 = String(
|
|
13007
|
+
const str2 = String(value2);
|
|
13008
13008
|
let start = 0;
|
|
13009
13009
|
let quoted = false;
|
|
13010
13010
|
let escaped = false;
|
|
@@ -13046,19 +13046,19 @@ var require_axios = __commonJS({
|
|
|
13046
13046
|
return parameters;
|
|
13047
13047
|
}
|
|
13048
13048
|
var isValidHeaderName = (str2) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str2.trim());
|
|
13049
|
-
function matchHeaderValue(context,
|
|
13049
|
+
function matchHeaderValue(context, value2, header, filter, isHeaderNameFilter) {
|
|
13050
13050
|
if (utils$1.isFunction(filter)) {
|
|
13051
|
-
return filter.call(this,
|
|
13051
|
+
return filter.call(this, value2, header);
|
|
13052
13052
|
}
|
|
13053
13053
|
if (isHeaderNameFilter) {
|
|
13054
|
-
|
|
13054
|
+
value2 = header;
|
|
13055
13055
|
}
|
|
13056
|
-
if (!utils$1.isString(
|
|
13056
|
+
if (!utils$1.isString(value2)) return;
|
|
13057
13057
|
if (utils$1.isString(filter)) {
|
|
13058
|
-
return
|
|
13058
|
+
return value2.indexOf(filter) !== -1;
|
|
13059
13059
|
}
|
|
13060
13060
|
if (utils$1.isRegExp(filter)) {
|
|
13061
|
-
return filter.test(
|
|
13061
|
+
return filter.test(value2);
|
|
13062
13062
|
}
|
|
13063
13063
|
}
|
|
13064
13064
|
function formatHeader(header) {
|
|
@@ -13126,18 +13126,18 @@ var require_axios = __commonJS({
|
|
|
13126
13126
|
if (header) {
|
|
13127
13127
|
const key = utils$1.findKey(this, header);
|
|
13128
13128
|
if (key) {
|
|
13129
|
-
const
|
|
13129
|
+
const value2 = this[key];
|
|
13130
13130
|
if (!parser) {
|
|
13131
|
-
return
|
|
13131
|
+
return value2;
|
|
13132
13132
|
}
|
|
13133
13133
|
if (parser === true) {
|
|
13134
|
-
return parseTokens(
|
|
13134
|
+
return parseTokens(value2);
|
|
13135
13135
|
}
|
|
13136
13136
|
if (utils$1.isFunction(parser)) {
|
|
13137
|
-
return parser.call(this,
|
|
13137
|
+
return parser.call(this, value2, key);
|
|
13138
13138
|
}
|
|
13139
13139
|
if (utils$1.isRegExp(parser)) {
|
|
13140
|
-
return parser.exec(
|
|
13140
|
+
return parser.exec(value2);
|
|
13141
13141
|
}
|
|
13142
13142
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
13143
13143
|
}
|
|
@@ -13187,10 +13187,10 @@ var require_axios = __commonJS({
|
|
|
13187
13187
|
normalize(format2) {
|
|
13188
13188
|
const self2 = this;
|
|
13189
13189
|
const headers = {};
|
|
13190
|
-
utils$1.forEach(this, (
|
|
13190
|
+
utils$1.forEach(this, (value2, header) => {
|
|
13191
13191
|
const key = utils$1.findKey(headers, header);
|
|
13192
13192
|
if (key) {
|
|
13193
|
-
self2[key] = normalizeValue(
|
|
13193
|
+
self2[key] = normalizeValue(value2);
|
|
13194
13194
|
delete self2[header];
|
|
13195
13195
|
return;
|
|
13196
13196
|
}
|
|
@@ -13198,7 +13198,7 @@ var require_axios = __commonJS({
|
|
|
13198
13198
|
if (normalized !== header) {
|
|
13199
13199
|
delete self2[header];
|
|
13200
13200
|
}
|
|
13201
|
-
self2[normalized] = normalizeValue(
|
|
13201
|
+
self2[normalized] = normalizeValue(value2);
|
|
13202
13202
|
headers[normalized] = true;
|
|
13203
13203
|
});
|
|
13204
13204
|
return this;
|
|
@@ -13208,8 +13208,8 @@ var require_axios = __commonJS({
|
|
|
13208
13208
|
}
|
|
13209
13209
|
toJSON(asStrings) {
|
|
13210
13210
|
const obj = /* @__PURE__ */ Object.create(null);
|
|
13211
|
-
utils$1.forEach(this, (
|
|
13212
|
-
|
|
13211
|
+
utils$1.forEach(this, (value2, header) => {
|
|
13212
|
+
value2 != null && value2 !== false && (obj[header] = asStrings && utils$1.isArray(value2) ? value2.join(", ") : value2);
|
|
13213
13213
|
});
|
|
13214
13214
|
return obj;
|
|
13215
13215
|
}
|
|
@@ -13217,11 +13217,11 @@ var require_axios = __commonJS({
|
|
|
13217
13217
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
13218
13218
|
}
|
|
13219
13219
|
toString() {
|
|
13220
|
-
return Object.entries(this.toJSON()).map(([header,
|
|
13220
|
+
return Object.entries(this.toJSON()).map(([header, value2]) => header + ": " + value2).join("\n");
|
|
13221
13221
|
}
|
|
13222
13222
|
getSetCookie() {
|
|
13223
|
-
const
|
|
13224
|
-
return utils$1.isArray(
|
|
13223
|
+
const value2 = this.get("set-cookie");
|
|
13224
|
+
return utils$1.isArray(value2) ? value2 : value2 == null || value2 === false ? [] : [value2];
|
|
13225
13225
|
}
|
|
13226
13226
|
get [Symbol.toStringTag]() {
|
|
13227
13227
|
return "AxiosHeaders";
|
|
@@ -13229,8 +13229,8 @@ var require_axios = __commonJS({
|
|
|
13229
13229
|
static from(thing) {
|
|
13230
13230
|
return thing instanceof this ? thing : new this(thing);
|
|
13231
13231
|
}
|
|
13232
|
-
static parseParameters(
|
|
13233
|
-
return parseParameters(
|
|
13232
|
+
static parseParameters(value2) {
|
|
13233
|
+
return parseParameters(value2);
|
|
13234
13234
|
}
|
|
13235
13235
|
static concat(first, ...targets) {
|
|
13236
13236
|
const computed = new this(first);
|
|
@@ -13256,11 +13256,11 @@ var require_axios = __commonJS({
|
|
|
13256
13256
|
};
|
|
13257
13257
|
AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
13258
13258
|
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({
|
|
13259
|
-
value
|
|
13259
|
+
value: value2
|
|
13260
13260
|
}, key) => {
|
|
13261
13261
|
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
13262
13262
|
return {
|
|
13263
|
-
get: () =>
|
|
13263
|
+
get: () => value2,
|
|
13264
13264
|
set(headerValue) {
|
|
13265
13265
|
this[mapped] = headerValue;
|
|
13266
13266
|
}
|
|
@@ -13307,8 +13307,8 @@ var require_axios = __commonJS({
|
|
|
13307
13307
|
return source;
|
|
13308
13308
|
}
|
|
13309
13309
|
result = /* @__PURE__ */ Object.create(null);
|
|
13310
|
-
for (const [key,
|
|
13311
|
-
const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(
|
|
13310
|
+
for (const [key, value2] of Object.entries(source)) {
|
|
13311
|
+
const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value2);
|
|
13312
13312
|
if (!utils$1.isUndefined(reducedValue)) {
|
|
13313
13313
|
result[key] = reducedValue;
|
|
13314
13314
|
}
|
|
@@ -13319,9 +13319,9 @@ var require_axios = __commonJS({
|
|
|
13319
13319
|
};
|
|
13320
13320
|
return visit(config2);
|
|
13321
13321
|
}
|
|
13322
|
-
function stringifySafely$1(
|
|
13322
|
+
function stringifySafely$1(value2) {
|
|
13323
13323
|
try {
|
|
13324
|
-
return String(
|
|
13324
|
+
return String(value2);
|
|
13325
13325
|
} catch (err) {
|
|
13326
13326
|
return "";
|
|
13327
13327
|
}
|
|
@@ -13430,8 +13430,8 @@ var require_axios = __commonJS({
|
|
|
13430
13430
|
isBufferAvailable() {
|
|
13431
13431
|
return typeof Buffer !== "undefined";
|
|
13432
13432
|
},
|
|
13433
|
-
from(
|
|
13434
|
-
return Buffer.from(
|
|
13433
|
+
from(value2) {
|
|
13434
|
+
return Buffer.from(value2);
|
|
13435
13435
|
}
|
|
13436
13436
|
};
|
|
13437
13437
|
var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
|
|
@@ -13460,8 +13460,8 @@ var require_axios = __commonJS({
|
|
|
13460
13460
|
}
|
|
13461
13461
|
formData = formData || new (FormData$1 || FormData)();
|
|
13462
13462
|
const option = (name, fallback) => {
|
|
13463
|
-
const
|
|
13464
|
-
return utils$1.isUndefined(
|
|
13463
|
+
const value2 = utils$1.getSafeProp(options, name);
|
|
13464
|
+
return utils$1.isUndefined(value2) ? fallback : value2;
|
|
13465
13465
|
};
|
|
13466
13466
|
const metaTokens = option("metaTokens", true);
|
|
13467
13467
|
const visitor = option("visitor") || defaultVisitor;
|
|
@@ -13474,39 +13474,39 @@ var require_axios = __commonJS({
|
|
|
13474
13474
|
if (!utils$1.isFunction(visitor)) {
|
|
13475
13475
|
throw new TypeError("visitor must be a function");
|
|
13476
13476
|
}
|
|
13477
|
-
function convertValue(
|
|
13478
|
-
if (
|
|
13479
|
-
if (utils$1.isDate(
|
|
13480
|
-
return
|
|
13477
|
+
function convertValue(value2) {
|
|
13478
|
+
if (value2 === null) return "";
|
|
13479
|
+
if (utils$1.isDate(value2)) {
|
|
13480
|
+
return value2.toISOString();
|
|
13481
13481
|
}
|
|
13482
|
-
if (utils$1.isBoolean(
|
|
13483
|
-
return
|
|
13482
|
+
if (utils$1.isBoolean(value2)) {
|
|
13483
|
+
return value2.toString();
|
|
13484
13484
|
}
|
|
13485
|
-
if (!useBlob && utils$1.isBlob(
|
|
13485
|
+
if (!useBlob && utils$1.isBlob(value2)) {
|
|
13486
13486
|
throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
13487
13487
|
}
|
|
13488
|
-
if (utils$1.isArrayBuffer(
|
|
13488
|
+
if (utils$1.isArrayBuffer(value2) || utils$1.isTypedArray(value2)) {
|
|
13489
13489
|
if (useBlob && typeof _Blob === "function") {
|
|
13490
|
-
return new _Blob([
|
|
13490
|
+
return new _Blob([value2]);
|
|
13491
13491
|
}
|
|
13492
13492
|
if (PlatformBuffer && PlatformBuffer.isBufferAvailable()) {
|
|
13493
|
-
return PlatformBuffer.from(
|
|
13493
|
+
return PlatformBuffer.from(value2);
|
|
13494
13494
|
}
|
|
13495
13495
|
throw new AxiosError("Blob is not supported. Use a Buffer instead.", AxiosError.ERR_NOT_SUPPORT);
|
|
13496
13496
|
}
|
|
13497
|
-
return
|
|
13497
|
+
return value2;
|
|
13498
13498
|
}
|
|
13499
13499
|
function throwIfMaxDepthExceeded(depth) {
|
|
13500
13500
|
if (depth > maxDepth) {
|
|
13501
13501
|
throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
13502
13502
|
}
|
|
13503
13503
|
}
|
|
13504
|
-
function stringifyWithDepthLimit(
|
|
13504
|
+
function stringifyWithDepthLimit(value2, depth) {
|
|
13505
13505
|
if (maxDepth === Infinity) {
|
|
13506
|
-
return JSON.stringify(
|
|
13506
|
+
return JSON.stringify(value2);
|
|
13507
13507
|
}
|
|
13508
13508
|
const ancestors = [];
|
|
13509
|
-
return JSON.stringify(
|
|
13509
|
+
return JSON.stringify(value2, function limitDepth(_key, currentValue) {
|
|
13510
13510
|
if (!utils$1.isObject(currentValue)) {
|
|
13511
13511
|
return currentValue;
|
|
13512
13512
|
}
|
|
@@ -13518,17 +13518,17 @@ var require_axios = __commonJS({
|
|
|
13518
13518
|
return currentValue;
|
|
13519
13519
|
});
|
|
13520
13520
|
}
|
|
13521
|
-
function defaultVisitor(
|
|
13522
|
-
let arr =
|
|
13523
|
-
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(
|
|
13524
|
-
formData.append(renderKey(path2, key, dots), convertValue(
|
|
13521
|
+
function defaultVisitor(value2, key, path2) {
|
|
13522
|
+
let arr = value2;
|
|
13523
|
+
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value2)) {
|
|
13524
|
+
formData.append(renderKey(path2, key, dots), convertValue(value2));
|
|
13525
13525
|
return false;
|
|
13526
13526
|
}
|
|
13527
|
-
if (
|
|
13527
|
+
if (value2 && !path2 && typeof value2 === "object") {
|
|
13528
13528
|
if (utils$1.endsWith(key, "{}")) {
|
|
13529
13529
|
key = metaTokens ? key : key.slice(0, -2);
|
|
13530
|
-
|
|
13531
|
-
} else if (utils$1.isArray(
|
|
13530
|
+
value2 = stringifyWithDepthLimit(value2, 1);
|
|
13531
|
+
} else if (utils$1.isArray(value2) && isFlatArray(value2) || (utils$1.isFileList(value2) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value2))) {
|
|
13532
13532
|
key = removeBrackets(key);
|
|
13533
13533
|
arr.forEach(function each(el, index) {
|
|
13534
13534
|
!(utils$1.isUndefined(el) || el === null) && formData.append(
|
|
@@ -13540,10 +13540,10 @@ var require_axios = __commonJS({
|
|
|
13540
13540
|
return false;
|
|
13541
13541
|
}
|
|
13542
13542
|
}
|
|
13543
|
-
if (isVisitable(
|
|
13543
|
+
if (isVisitable(value2)) {
|
|
13544
13544
|
return true;
|
|
13545
13545
|
}
|
|
13546
|
-
formData.append(renderKey(path2, key, dots), convertValue(
|
|
13546
|
+
formData.append(renderKey(path2, key, dots), convertValue(value2));
|
|
13547
13547
|
return false;
|
|
13548
13548
|
}
|
|
13549
13549
|
const exposedHelpers = Object.assign(predicates, {
|
|
@@ -13551,14 +13551,14 @@ var require_axios = __commonJS({
|
|
|
13551
13551
|
convertValue,
|
|
13552
13552
|
isVisitable
|
|
13553
13553
|
});
|
|
13554
|
-
function build(
|
|
13555
|
-
if (utils$1.isUndefined(
|
|
13554
|
+
function build(value2, path2, depth = 0) {
|
|
13555
|
+
if (utils$1.isUndefined(value2)) return;
|
|
13556
13556
|
throwIfMaxDepthExceeded(depth);
|
|
13557
|
-
if (stack.indexOf(
|
|
13557
|
+
if (stack.indexOf(value2) !== -1) {
|
|
13558
13558
|
throw new Error("Circular reference detected in " + path2.join("."));
|
|
13559
13559
|
}
|
|
13560
|
-
stack.push(
|
|
13561
|
-
utils$1.forEach(
|
|
13560
|
+
stack.push(value2);
|
|
13561
|
+
utils$1.forEach(value2, function each(el, key) {
|
|
13562
13562
|
const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path2, exposedHelpers);
|
|
13563
13563
|
if (result === true) {
|
|
13564
13564
|
build(el, path2 ? path2.concat(key) : [key], depth + 1);
|
|
@@ -13590,11 +13590,11 @@ var require_axios = __commonJS({
|
|
|
13590
13590
|
params && toFormData(params, this, options);
|
|
13591
13591
|
}
|
|
13592
13592
|
var prototype = AxiosURLSearchParams.prototype;
|
|
13593
|
-
prototype.append = function append(name,
|
|
13594
|
-
this._pairs.push([name,
|
|
13593
|
+
prototype.append = function append(name, value2) {
|
|
13594
|
+
this._pairs.push([name, value2]);
|
|
13595
13595
|
};
|
|
13596
13596
|
prototype.toString = function toString2(encoder2) {
|
|
13597
|
-
const _encode = encoder2 ? (
|
|
13597
|
+
const _encode = encoder2 ? (value2) => encoder2.call(this, value2, encode$1) : encode$1;
|
|
13598
13598
|
return this._pairs.map(function each(pair) {
|
|
13599
13599
|
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
13600
13600
|
}, "").join("&");
|
|
@@ -13823,9 +13823,9 @@ var require_axios = __commonJS({
|
|
|
13823
13823
|
};
|
|
13824
13824
|
function toURLEncodedForm(data, options) {
|
|
13825
13825
|
return toFormData(data, new platform.classes.URLSearchParams(), {
|
|
13826
|
-
visitor: function(
|
|
13827
|
-
if (platform.isNode && utils$1.isBuffer(
|
|
13828
|
-
this.append(key,
|
|
13826
|
+
visitor: function(value2, key, path2, helpers) {
|
|
13827
|
+
if (platform.isNode && utils$1.isBuffer(value2)) {
|
|
13828
|
+
this.append(key, value2.toString("base64"));
|
|
13829
13829
|
return false;
|
|
13830
13830
|
}
|
|
13831
13831
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
@@ -13862,7 +13862,7 @@ var require_axios = __commonJS({
|
|
|
13862
13862
|
return obj;
|
|
13863
13863
|
}
|
|
13864
13864
|
function formDataToJSON(formData) {
|
|
13865
|
-
function buildPath(path2,
|
|
13865
|
+
function buildPath(path2, value2, target, index) {
|
|
13866
13866
|
throwIfDepthExceeded(index);
|
|
13867
13867
|
let name = path2[index++];
|
|
13868
13868
|
if (name === "__proto__") return true;
|
|
@@ -13871,16 +13871,16 @@ var require_axios = __commonJS({
|
|
|
13871
13871
|
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
13872
13872
|
if (isLast) {
|
|
13873
13873
|
if (utils$1.hasOwnProp(target, name)) {
|
|
13874
|
-
target[name] = utils$1.isArray(target[name]) ? target[name].concat(
|
|
13874
|
+
target[name] = utils$1.isArray(target[name]) ? target[name].concat(value2) : [target[name], value2];
|
|
13875
13875
|
} else {
|
|
13876
|
-
target[name] =
|
|
13876
|
+
target[name] = value2;
|
|
13877
13877
|
}
|
|
13878
13878
|
return !isNumericKey;
|
|
13879
13879
|
}
|
|
13880
13880
|
if (!utils$1.hasOwnProp(target, name) || !utils$1.isObject(target[name])) {
|
|
13881
13881
|
target[name] = [];
|
|
13882
13882
|
}
|
|
13883
|
-
const result = buildPath(path2,
|
|
13883
|
+
const result = buildPath(path2, value2, target[name], index);
|
|
13884
13884
|
if (result && utils$1.isArray(target[name])) {
|
|
13885
13885
|
target[name] = arrayToObject(target[name]);
|
|
13886
13886
|
}
|
|
@@ -13888,8 +13888,8 @@ var require_axios = __commonJS({
|
|
|
13888
13888
|
}
|
|
13889
13889
|
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
|
13890
13890
|
const obj = {};
|
|
13891
|
-
utils$1.forEachEntry(formData, (name,
|
|
13892
|
-
buildPath(parsePropPath(name),
|
|
13891
|
+
utils$1.forEachEntry(formData, (name, value2) => {
|
|
13892
|
+
buildPath(parsePropPath(name), value2, obj, 0);
|
|
13893
13893
|
});
|
|
13894
13894
|
return obj;
|
|
13895
13895
|
}
|
|
@@ -14015,8 +14015,8 @@ var require_axios = __commonJS({
|
|
|
14015
14015
|
headers.normalize();
|
|
14016
14016
|
return data;
|
|
14017
14017
|
}
|
|
14018
|
-
function isCancel(
|
|
14019
|
-
return !!(
|
|
14018
|
+
function isCancel(value2) {
|
|
14019
|
+
return !!(value2 && value2.__CANCEL__);
|
|
14020
14020
|
}
|
|
14021
14021
|
var CanceledError = class extends AxiosError {
|
|
14022
14022
|
/**
|
|
@@ -14354,33 +14354,33 @@ var require_axios = __commonJS({
|
|
|
14354
14354
|
var CRLF_BYTES = textEncoder.encode(CRLF);
|
|
14355
14355
|
var CRLF_BYTES_COUNT = 2;
|
|
14356
14356
|
var FormDataPart = class {
|
|
14357
|
-
constructor(name,
|
|
14357
|
+
constructor(name, value2) {
|
|
14358
14358
|
const {
|
|
14359
14359
|
escapeName
|
|
14360
14360
|
} = this.constructor;
|
|
14361
|
-
const isStringValue = utils$1.isString(
|
|
14362
|
-
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue &&
|
|
14361
|
+
const isStringValue = utils$1.isString(value2);
|
|
14362
|
+
let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value2.name ? `; filename="${escapeName(value2.name)}"` : ""}${CRLF}`;
|
|
14363
14363
|
if (isStringValue) {
|
|
14364
|
-
|
|
14364
|
+
value2 = textEncoder.encode(String(value2).replace(/\r?\n|\r\n?/g, CRLF));
|
|
14365
14365
|
} else {
|
|
14366
|
-
const safeType = String(
|
|
14366
|
+
const safeType = String(value2.type || "application/octet-stream").replace(/[\r\n]/g, "");
|
|
14367
14367
|
headers += `Content-Type: ${safeType}${CRLF}`;
|
|
14368
14368
|
}
|
|
14369
14369
|
this.headers = textEncoder.encode(headers + CRLF);
|
|
14370
|
-
this.contentLength = isStringValue ?
|
|
14370
|
+
this.contentLength = isStringValue ? value2.byteLength : value2.size;
|
|
14371
14371
|
this.size = this.headers.byteLength + this.contentLength + CRLF_BYTES_COUNT;
|
|
14372
14372
|
this.name = name;
|
|
14373
|
-
this.value =
|
|
14373
|
+
this.value = value2;
|
|
14374
14374
|
}
|
|
14375
14375
|
async *encode() {
|
|
14376
14376
|
yield this.headers;
|
|
14377
14377
|
const {
|
|
14378
|
-
value
|
|
14378
|
+
value: value2
|
|
14379
14379
|
} = this;
|
|
14380
|
-
if (utils$1.isTypedArray(
|
|
14381
|
-
yield
|
|
14380
|
+
if (utils$1.isTypedArray(value2)) {
|
|
14381
|
+
yield value2;
|
|
14382
14382
|
} else {
|
|
14383
|
-
yield* readBlob(
|
|
14383
|
+
yield* readBlob(value2);
|
|
14384
14384
|
}
|
|
14385
14385
|
yield CRLF_BYTES;
|
|
14386
14386
|
}
|
|
@@ -14407,8 +14407,8 @@ var require_axios = __commonJS({
|
|
|
14407
14407
|
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
|
14408
14408
|
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
|
|
14409
14409
|
let contentLength = footerBytes.byteLength;
|
|
14410
|
-
const parts = Array.from(form.entries()).map(([name,
|
|
14411
|
-
const part = new FormDataPart(name,
|
|
14410
|
+
const parts = Array.from(form.entries()).map(([name, value2]) => {
|
|
14411
|
+
const part = new FormDataPart(name, value2);
|
|
14412
14412
|
contentLength += part.size;
|
|
14413
14413
|
return part;
|
|
14414
14414
|
});
|
|
@@ -14526,9 +14526,9 @@ var require_axios = __commonJS({
|
|
|
14526
14526
|
var callbackify = (fn, reducer) => {
|
|
14527
14527
|
return utils$1.isAsyncFn(fn) ? function(...args) {
|
|
14528
14528
|
const cb = args.pop();
|
|
14529
|
-
fn.apply(this, args).then((
|
|
14529
|
+
fn.apply(this, args).then((value2) => {
|
|
14530
14530
|
try {
|
|
14531
|
-
reducer ? cb(null, ...reducer(
|
|
14531
|
+
reducer ? cb(null, ...reducer(value2)) : cb(null, value2);
|
|
14532
14532
|
} catch (err) {
|
|
14533
14533
|
cb(err);
|
|
14534
14534
|
}
|
|
@@ -14536,12 +14536,12 @@ var require_axios = __commonJS({
|
|
|
14536
14536
|
} : fn;
|
|
14537
14537
|
};
|
|
14538
14538
|
var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
|
|
14539
|
-
var trimTrailingDots = (
|
|
14540
|
-
let end =
|
|
14541
|
-
while (end &&
|
|
14539
|
+
var trimTrailingDots = (value2) => {
|
|
14540
|
+
let end = value2.length;
|
|
14541
|
+
while (end && value2.charCodeAt(end - 1) === 46) {
|
|
14542
14542
|
end--;
|
|
14543
14543
|
}
|
|
14544
|
-
return end ===
|
|
14544
|
+
return end === value2.length ? value2 : value2.slice(0, end);
|
|
14545
14545
|
};
|
|
14546
14546
|
var isIPv4Loopback = (host) => {
|
|
14547
14547
|
const parts = host.split(".");
|
|
@@ -14711,8 +14711,8 @@ var require_axios = __commonJS({
|
|
|
14711
14711
|
return null;
|
|
14712
14712
|
}
|
|
14713
14713
|
return groups.flatMap((group) => {
|
|
14714
|
-
const
|
|
14715
|
-
return [
|
|
14714
|
+
const value2 = Number.parseInt(group, 16);
|
|
14715
|
+
return [value2 >> 8 & 255, value2 & 255];
|
|
14716
14716
|
});
|
|
14717
14717
|
};
|
|
14718
14718
|
var ipToBytes = (host) => {
|
|
@@ -15155,14 +15155,14 @@ var require_axios = __commonJS({
|
|
|
15155
15155
|
var supportedProtocols = platform.protocols.map((protocol) => {
|
|
15156
15156
|
return protocol + ":";
|
|
15157
15157
|
});
|
|
15158
|
-
var decodeURIComponentSafe$1 = (
|
|
15159
|
-
if (!utils$1.isString(
|
|
15160
|
-
return
|
|
15158
|
+
var decodeURIComponentSafe$1 = (value2) => {
|
|
15159
|
+
if (!utils$1.isString(value2)) {
|
|
15160
|
+
return value2;
|
|
15161
15161
|
}
|
|
15162
15162
|
try {
|
|
15163
|
-
return decodeURIComponent(
|
|
15163
|
+
return decodeURIComponent(value2);
|
|
15164
15164
|
} catch (error) {
|
|
15165
|
-
return
|
|
15165
|
+
return value2;
|
|
15166
15166
|
}
|
|
15167
15167
|
};
|
|
15168
15168
|
var flushOnFinish = (stream2, [throttled, flush]) => {
|
|
@@ -15307,14 +15307,14 @@ var require_axios = __commonJS({
|
|
|
15307
15307
|
return new Promise((resolve, reject) => {
|
|
15308
15308
|
let onDone;
|
|
15309
15309
|
let isDone;
|
|
15310
|
-
const done = (
|
|
15310
|
+
const done = (value2, isRejected) => {
|
|
15311
15311
|
if (isDone) return;
|
|
15312
15312
|
isDone = true;
|
|
15313
|
-
onDone && onDone(
|
|
15313
|
+
onDone && onDone(value2, isRejected);
|
|
15314
15314
|
};
|
|
15315
|
-
const _resolve = (
|
|
15316
|
-
done(
|
|
15317
|
-
resolve(
|
|
15315
|
+
const _resolve = (value2) => {
|
|
15316
|
+
done(value2);
|
|
15317
|
+
resolve(value2);
|
|
15318
15318
|
};
|
|
15319
15319
|
const _reject = (reason) => {
|
|
15320
15320
|
done(reason, true);
|
|
@@ -15345,7 +15345,7 @@ var require_axios = __commonJS({
|
|
|
15345
15345
|
if (normalized) {
|
|
15346
15346
|
return normalized;
|
|
15347
15347
|
}
|
|
15348
|
-
const callbackLookup = callbackify(lookup2, (
|
|
15348
|
+
const callbackLookup = callbackify(lookup2, (value2) => utils$1.isArray(value2) ? value2 : [value2]);
|
|
15349
15349
|
normalized = (hostname, opt, cb) => {
|
|
15350
15350
|
callbackLookup(hostname, opt, (err, arg0, arg1) => {
|
|
15351
15351
|
if (err) {
|
|
@@ -15969,9 +15969,9 @@ var require_axios = __commonJS({
|
|
|
15969
15969
|
var cookies = platform.hasStandardBrowserEnv ? (
|
|
15970
15970
|
// Standard browser envs support document.cookie
|
|
15971
15971
|
{
|
|
15972
|
-
write(name,
|
|
15972
|
+
write(name, value2, expires, path2, domain, secure, sameSite) {
|
|
15973
15973
|
if (typeof document === "undefined") return;
|
|
15974
|
-
const cookie = [`${name}=${encodeURIComponent(
|
|
15974
|
+
const cookie = [`${name}=${encodeURIComponent(value2)}`];
|
|
15975
15975
|
if (utils$1.isNumber(expires)) {
|
|
15976
15976
|
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
15977
15977
|
}
|
|
@@ -16253,8 +16253,8 @@ var require_axios = __commonJS({
|
|
|
16253
16253
|
config: config2,
|
|
16254
16254
|
request
|
|
16255
16255
|
};
|
|
16256
|
-
settle(function _resolve(
|
|
16257
|
-
resolve(
|
|
16256
|
+
settle(function _resolve(value2) {
|
|
16257
|
+
resolve(value2);
|
|
16258
16258
|
done();
|
|
16259
16259
|
}, function _reject(err) {
|
|
16260
16260
|
reject(err);
|
|
@@ -16423,12 +16423,12 @@ var require_axios = __commonJS({
|
|
|
16423
16423
|
for (; ; ) {
|
|
16424
16424
|
const {
|
|
16425
16425
|
done,
|
|
16426
|
-
value
|
|
16426
|
+
value: value2
|
|
16427
16427
|
} = await reader.read();
|
|
16428
16428
|
if (done) {
|
|
16429
16429
|
break;
|
|
16430
16430
|
}
|
|
16431
|
-
yield
|
|
16431
|
+
yield value2;
|
|
16432
16432
|
}
|
|
16433
16433
|
} finally {
|
|
16434
16434
|
await reader.cancel();
|
|
@@ -16449,19 +16449,19 @@ var require_axios = __commonJS({
|
|
|
16449
16449
|
try {
|
|
16450
16450
|
const {
|
|
16451
16451
|
done: done2,
|
|
16452
|
-
value
|
|
16452
|
+
value: value2
|
|
16453
16453
|
} = await iterator2.next();
|
|
16454
16454
|
if (done2) {
|
|
16455
16455
|
_onFinish();
|
|
16456
16456
|
controller.close();
|
|
16457
16457
|
return;
|
|
16458
16458
|
}
|
|
16459
|
-
let len =
|
|
16459
|
+
let len = value2.byteLength;
|
|
16460
16460
|
if (onProgress) {
|
|
16461
16461
|
let loadedBytes = bytes += len;
|
|
16462
16462
|
onProgress(loadedBytes);
|
|
16463
16463
|
}
|
|
16464
|
-
controller.enqueue(new Uint8Array(
|
|
16464
|
+
controller.enqueue(new Uint8Array(value2));
|
|
16465
16465
|
} catch (err) {
|
|
16466
16466
|
_onFinish(err);
|
|
16467
16467
|
throw err;
|
|
@@ -16491,14 +16491,14 @@ var require_axios = __commonJS({
|
|
|
16491
16491
|
isFunction
|
|
16492
16492
|
} = utils$1;
|
|
16493
16493
|
var encodeUTF8 = (str2) => encodeURIComponent(str2).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
|
|
16494
|
-
var decodeURIComponentSafe = (
|
|
16495
|
-
if (!utils$1.isString(
|
|
16496
|
-
return
|
|
16494
|
+
var decodeURIComponentSafe = (value2) => {
|
|
16495
|
+
if (!utils$1.isString(value2)) {
|
|
16496
|
+
return value2;
|
|
16497
16497
|
}
|
|
16498
16498
|
try {
|
|
16499
|
-
return decodeURIComponent(
|
|
16499
|
+
return decodeURIComponent(value2);
|
|
16500
16500
|
} catch (error) {
|
|
16501
|
-
return
|
|
16501
|
+
return value2;
|
|
16502
16502
|
}
|
|
16503
16503
|
};
|
|
16504
16504
|
var test = (fn, ...args) => {
|
|
@@ -16735,9 +16735,9 @@ var require_axios = __commonJS({
|
|
|
16735
16735
|
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
16736
16736
|
});
|
|
16737
16737
|
if (isRequestSupported) {
|
|
16738
|
-
utils$1.forEach(DEFAULT_REQUEST_OPTIONS, (
|
|
16738
|
+
utils$1.forEach(DEFAULT_REQUEST_OPTIONS, (value2, key) => {
|
|
16739
16739
|
if (resolvedOptions[key] === void 0) {
|
|
16740
|
-
resolvedOptions[key] =
|
|
16740
|
+
resolvedOptions[key] = value2;
|
|
16741
16741
|
}
|
|
16742
16742
|
});
|
|
16743
16743
|
if (resolvedOptions.signal === void 0) {
|
|
@@ -16879,18 +16879,18 @@ var require_axios = __commonJS({
|
|
|
16879
16879
|
get: getFetch
|
|
16880
16880
|
}
|
|
16881
16881
|
};
|
|
16882
|
-
utils$1.forEach(knownAdapters, (fn,
|
|
16882
|
+
utils$1.forEach(knownAdapters, (fn, value2) => {
|
|
16883
16883
|
if (fn) {
|
|
16884
16884
|
try {
|
|
16885
16885
|
Object.defineProperty(fn, "name", {
|
|
16886
16886
|
__proto__: null,
|
|
16887
|
-
value
|
|
16887
|
+
value: value2
|
|
16888
16888
|
});
|
|
16889
16889
|
} catch (e) {
|
|
16890
16890
|
}
|
|
16891
16891
|
Object.defineProperty(fn, "adapterName", {
|
|
16892
16892
|
__proto__: null,
|
|
16893
|
-
value
|
|
16893
|
+
value: value2
|
|
16894
16894
|
});
|
|
16895
16895
|
}
|
|
16896
16896
|
});
|
|
@@ -16992,7 +16992,7 @@ var require_axios = __commonJS({
|
|
|
16992
16992
|
function formatMessage(opt, desc) {
|
|
16993
16993
|
return "[Axios v" + VERSION + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
|
|
16994
16994
|
}
|
|
16995
|
-
return (
|
|
16995
|
+
return (value2, opt, opts) => {
|
|
16996
16996
|
if (validator2 === false) {
|
|
16997
16997
|
throw new AxiosError(formatMessage(opt, " has been removed" + (version ? " in " + version : "")), AxiosError.ERR_DEPRECATED);
|
|
16998
16998
|
}
|
|
@@ -17000,11 +17000,11 @@ var require_axios = __commonJS({
|
|
|
17000
17000
|
deprecatedWarnings[opt] = true;
|
|
17001
17001
|
console.warn(formatMessage(opt, " has been deprecated since v" + version + " and will be removed in the near future"));
|
|
17002
17002
|
}
|
|
17003
|
-
return validator2 ? validator2(
|
|
17003
|
+
return validator2 ? validator2(value2, opt, opts) : true;
|
|
17004
17004
|
};
|
|
17005
17005
|
};
|
|
17006
17006
|
validators$1.spelling = function spelling(correctSpelling) {
|
|
17007
|
-
return (
|
|
17007
|
+
return (value2, opt) => {
|
|
17008
17008
|
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
|
17009
17009
|
return true;
|
|
17010
17010
|
};
|
|
@@ -17019,8 +17019,8 @@ var require_axios = __commonJS({
|
|
|
17019
17019
|
const opt = keys[i];
|
|
17020
17020
|
const validator2 = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0;
|
|
17021
17021
|
if (validator2) {
|
|
17022
|
-
const
|
|
17023
|
-
const result =
|
|
17022
|
+
const value2 = options[opt];
|
|
17023
|
+
const result = value2 === void 0 || validator2(value2, opt, options);
|
|
17024
17024
|
if (result !== true) {
|
|
17025
17025
|
throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE);
|
|
17026
17026
|
}
|
|
@@ -17419,9 +17419,9 @@ var require_axios = __commonJS({
|
|
|
17419
17419
|
SslHandshakeFailed: 525,
|
|
17420
17420
|
InvalidSslCertificate: 526
|
|
17421
17421
|
};
|
|
17422
|
-
Object.entries(HttpStatusCode).forEach(([key,
|
|
17423
|
-
if (HttpStatusCode[
|
|
17424
|
-
HttpStatusCode[
|
|
17422
|
+
Object.entries(HttpStatusCode).forEach(([key, value2]) => {
|
|
17423
|
+
if (HttpStatusCode[value2] === void 0) {
|
|
17424
|
+
HttpStatusCode[value2] = key;
|
|
17425
17425
|
}
|
|
17426
17426
|
});
|
|
17427
17427
|
function createInstance(defaultConfig) {
|
|
@@ -17591,7 +17591,7 @@ var require_object_inspect = __commonJS({
|
|
|
17591
17591
|
} else if (indexOf(seen, obj) >= 0) {
|
|
17592
17592
|
return "[Circular]";
|
|
17593
17593
|
}
|
|
17594
|
-
function inspect(
|
|
17594
|
+
function inspect(value2, from, noIndent) {
|
|
17595
17595
|
if (from) {
|
|
17596
17596
|
seen = $arrSlice.call(seen);
|
|
17597
17597
|
seen.push(from);
|
|
@@ -17603,9 +17603,9 @@ var require_object_inspect = __commonJS({
|
|
|
17603
17603
|
if (has(opts, "quoteStyle")) {
|
|
17604
17604
|
newOpts.quoteStyle = opts.quoteStyle;
|
|
17605
17605
|
}
|
|
17606
|
-
return inspect_(
|
|
17606
|
+
return inspect_(value2, newOpts, depth + 1, seen);
|
|
17607
17607
|
}
|
|
17608
|
-
return inspect_(
|
|
17608
|
+
return inspect_(value2, opts, depth + 1, seen);
|
|
17609
17609
|
}
|
|
17610
17610
|
if (typeof obj === "function" && !isRegExp(obj)) {
|
|
17611
17611
|
var name = nameOf(obj);
|
|
@@ -17659,8 +17659,8 @@ var require_object_inspect = __commonJS({
|
|
|
17659
17659
|
if (isMap(obj)) {
|
|
17660
17660
|
var mapParts = [];
|
|
17661
17661
|
if (mapForEach) {
|
|
17662
|
-
mapForEach.call(obj, function(
|
|
17663
|
-
mapParts.push(inspect(key, obj, true) + " => " + inspect(
|
|
17662
|
+
mapForEach.call(obj, function(value2, key) {
|
|
17663
|
+
mapParts.push(inspect(key, obj, true) + " => " + inspect(value2, obj));
|
|
17664
17664
|
});
|
|
17665
17665
|
}
|
|
17666
17666
|
return collectionOf("Map", mapSize.call(obj), mapParts, indent);
|
|
@@ -17668,8 +17668,8 @@ var require_object_inspect = __commonJS({
|
|
|
17668
17668
|
if (isSet(obj)) {
|
|
17669
17669
|
var setParts = [];
|
|
17670
17670
|
if (setForEach) {
|
|
17671
|
-
setForEach.call(obj, function(
|
|
17672
|
-
setParts.push(inspect(
|
|
17671
|
+
setForEach.call(obj, function(value2) {
|
|
17672
|
+
setParts.push(inspect(value2, obj));
|
|
17673
17673
|
});
|
|
17674
17674
|
}
|
|
17675
17675
|
return collectionOf("Set", setSize.call(obj), setParts, indent);
|
|
@@ -18028,17 +18028,17 @@ var require_side_channel_list = __commonJS({
|
|
|
18028
18028
|
var node = listGetNode(objects, key);
|
|
18029
18029
|
return node && node.value;
|
|
18030
18030
|
};
|
|
18031
|
-
var listSet = function(objects, key,
|
|
18031
|
+
var listSet = function(objects, key, value2) {
|
|
18032
18032
|
var node = listGetNode(objects, key);
|
|
18033
18033
|
if (node) {
|
|
18034
|
-
node.value =
|
|
18034
|
+
node.value = value2;
|
|
18035
18035
|
} else {
|
|
18036
18036
|
objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
|
|
18037
18037
|
{
|
|
18038
18038
|
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
18039
18039
|
key,
|
|
18040
18040
|
next: objects.next,
|
|
18041
|
-
value
|
|
18041
|
+
value: value2
|
|
18042
18042
|
};
|
|
18043
18043
|
}
|
|
18044
18044
|
};
|
|
@@ -18074,7 +18074,7 @@ var require_side_channel_list = __commonJS({
|
|
|
18074
18074
|
has: function(key) {
|
|
18075
18075
|
return listHas($o, key);
|
|
18076
18076
|
},
|
|
18077
|
-
set: function(key,
|
|
18077
|
+
set: function(key, value2) {
|
|
18078
18078
|
if (!$o) {
|
|
18079
18079
|
$o = {
|
|
18080
18080
|
next: void 0
|
|
@@ -18084,7 +18084,7 @@ var require_side_channel_list = __commonJS({
|
|
|
18084
18084
|
/** @type {NonNullable<typeof $o>} */
|
|
18085
18085
|
$o,
|
|
18086
18086
|
key,
|
|
18087
|
-
|
|
18087
|
+
value2
|
|
18088
18088
|
);
|
|
18089
18089
|
}
|
|
18090
18090
|
};
|
|
@@ -18160,11 +18160,11 @@ var require_side_channel_map = __commonJS({
|
|
|
18160
18160
|
}
|
|
18161
18161
|
return false;
|
|
18162
18162
|
},
|
|
18163
|
-
set: function(key,
|
|
18163
|
+
set: function(key, value2) {
|
|
18164
18164
|
if (!$m) {
|
|
18165
18165
|
$m = new $Map();
|
|
18166
18166
|
}
|
|
18167
|
-
$mapSet($m, key,
|
|
18167
|
+
$mapSet($m, key, value2);
|
|
18168
18168
|
}
|
|
18169
18169
|
};
|
|
18170
18170
|
return channel;
|
|
@@ -18225,17 +18225,17 @@ var require_side_channel_weakmap = __commonJS({
|
|
|
18225
18225
|
}
|
|
18226
18226
|
return !!$m && $m.has(key);
|
|
18227
18227
|
},
|
|
18228
|
-
set: function(key,
|
|
18228
|
+
set: function(key, value2) {
|
|
18229
18229
|
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
|
18230
18230
|
if (!$wm) {
|
|
18231
18231
|
$wm = new $WeakMap();
|
|
18232
18232
|
}
|
|
18233
|
-
$weakMapSet($wm, key,
|
|
18233
|
+
$weakMapSet($wm, key, value2);
|
|
18234
18234
|
} else if (getSideChannelMap) {
|
|
18235
18235
|
if (!$m) {
|
|
18236
18236
|
$m = getSideChannelMap();
|
|
18237
18237
|
}
|
|
18238
|
-
$m.set(key,
|
|
18238
|
+
$m.set(key, value2);
|
|
18239
18239
|
}
|
|
18240
18240
|
}
|
|
18241
18241
|
};
|
|
@@ -18273,11 +18273,11 @@ var require_side_channel = __commonJS({
|
|
|
18273
18273
|
has: function(key) {
|
|
18274
18274
|
return !!$channelData && $channelData.has(key);
|
|
18275
18275
|
},
|
|
18276
|
-
set: function(key,
|
|
18276
|
+
set: function(key, value2) {
|
|
18277
18277
|
if (!$channelData) {
|
|
18278
18278
|
$channelData = makeChannel();
|
|
18279
18279
|
}
|
|
18280
|
-
$channelData.set(key,
|
|
18280
|
+
$channelData.set(key, value2);
|
|
18281
18281
|
}
|
|
18282
18282
|
};
|
|
18283
18283
|
return channel;
|
|
@@ -18298,11 +18298,11 @@ var require_formats = __commonJS({
|
|
|
18298
18298
|
module.exports = {
|
|
18299
18299
|
"default": Format.RFC3986,
|
|
18300
18300
|
formatters: {
|
|
18301
|
-
RFC1738: function(
|
|
18302
|
-
return replace2.call(
|
|
18301
|
+
RFC1738: function(value2) {
|
|
18302
|
+
return replace2.call(value2, percentTwenties, "+");
|
|
18303
18303
|
},
|
|
18304
|
-
RFC3986: function(
|
|
18305
|
-
return String(
|
|
18304
|
+
RFC3986: function(value2) {
|
|
18305
|
+
return String(value2);
|
|
18306
18306
|
}
|
|
18307
18307
|
},
|
|
18308
18308
|
RFC1738: Format.RFC1738,
|
|
@@ -18365,16 +18365,16 @@ var require_utils = __commonJS({
|
|
|
18365
18365
|
}
|
|
18366
18366
|
return obj;
|
|
18367
18367
|
};
|
|
18368
|
-
var setProperty = function setProperty2(obj, key,
|
|
18368
|
+
var setProperty = function setProperty2(obj, key, value2) {
|
|
18369
18369
|
if (key === "__proto__" && defineProperty) {
|
|
18370
18370
|
defineProperty(obj, key, {
|
|
18371
18371
|
configurable: true,
|
|
18372
18372
|
enumerable: true,
|
|
18373
|
-
value,
|
|
18373
|
+
value: value2,
|
|
18374
18374
|
writable: true
|
|
18375
18375
|
});
|
|
18376
18376
|
} else {
|
|
18377
|
-
obj[key] =
|
|
18377
|
+
obj[key] = value2;
|
|
18378
18378
|
}
|
|
18379
18379
|
};
|
|
18380
18380
|
var merge = function merge2(target, source, options) {
|
|
@@ -18451,11 +18451,11 @@ var require_utils = __commonJS({
|
|
|
18451
18451
|
return target;
|
|
18452
18452
|
}
|
|
18453
18453
|
return Object.keys(source).reduce(function(acc, key) {
|
|
18454
|
-
var
|
|
18454
|
+
var value2 = source[key];
|
|
18455
18455
|
if (has.call(acc, key)) {
|
|
18456
|
-
setProperty(acc, key, merge2(acc[key],
|
|
18456
|
+
setProperty(acc, key, merge2(acc[key], value2, options));
|
|
18457
18457
|
} else {
|
|
18458
|
-
setProperty(acc, key,
|
|
18458
|
+
setProperty(acc, key, value2);
|
|
18459
18459
|
}
|
|
18460
18460
|
if (isOverflow(source) && !isOverflow(acc)) {
|
|
18461
18461
|
markOverflow(acc, getMaxIndex(source));
|
|
@@ -18539,8 +18539,8 @@ var require_utils = __commonJS({
|
|
|
18539
18539
|
}
|
|
18540
18540
|
return out;
|
|
18541
18541
|
};
|
|
18542
|
-
var compact = function compact2(
|
|
18543
|
-
var queue = [{ obj: { o:
|
|
18542
|
+
var compact = function compact2(value2) {
|
|
18543
|
+
var queue = [{ obj: { o: value2 }, prop: "o" }];
|
|
18544
18544
|
var refs = getSideChannel();
|
|
18545
18545
|
for (var i = 0; i < queue.length; ++i) {
|
|
18546
18546
|
var item = queue[i];
|
|
@@ -18556,7 +18556,7 @@ var require_utils = __commonJS({
|
|
|
18556
18556
|
}
|
|
18557
18557
|
}
|
|
18558
18558
|
compactQueue(queue);
|
|
18559
|
-
return
|
|
18559
|
+
return value2;
|
|
18560
18560
|
};
|
|
18561
18561
|
var isRegExp = function isRegExp2(obj) {
|
|
18562
18562
|
return Object.prototype.toString.call(obj) === "[object RegExp]";
|
|
@@ -18692,11 +18692,11 @@ var require_stringify = __commonJS({
|
|
|
18692
18692
|
} else if (obj instanceof Date) {
|
|
18693
18693
|
obj = serializeDate(obj);
|
|
18694
18694
|
} else if (generateArrayPrefix === "comma" && isArray(obj)) {
|
|
18695
|
-
obj = utils.maybeMap(obj, function(
|
|
18696
|
-
if (
|
|
18697
|
-
return serializeDate(
|
|
18695
|
+
obj = utils.maybeMap(obj, function(value3) {
|
|
18696
|
+
if (value3 instanceof Date) {
|
|
18697
|
+
return serializeDate(value3);
|
|
18698
18698
|
}
|
|
18699
|
-
return
|
|
18699
|
+
return value3;
|
|
18700
18700
|
});
|
|
18701
18701
|
}
|
|
18702
18702
|
if (obj === null) {
|
|
@@ -18737,8 +18737,8 @@ var require_stringify = __commonJS({
|
|
|
18737
18737
|
}
|
|
18738
18738
|
for (var j = 0; j < objKeys.length; ++j) {
|
|
18739
18739
|
var key = objKeys[j];
|
|
18740
|
-
var
|
|
18741
|
-
if (skipNulls &&
|
|
18740
|
+
var value2 = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj[key];
|
|
18741
|
+
if (skipNulls && value2 === null) {
|
|
18742
18742
|
continue;
|
|
18743
18743
|
}
|
|
18744
18744
|
var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, "%2E") : String(key);
|
|
@@ -18747,7 +18747,7 @@ var require_stringify = __commonJS({
|
|
|
18747
18747
|
var valueSideChannel = getSideChannel();
|
|
18748
18748
|
valueSideChannel.set(sentinel, sideChannel);
|
|
18749
18749
|
pushToArray(values, stringify2(
|
|
18750
|
-
|
|
18750
|
+
value2,
|
|
18751
18751
|
keyPrefix,
|
|
18752
18752
|
generateArrayPrefix,
|
|
18753
18753
|
commaRoundTrip,
|
|
@@ -18862,12 +18862,12 @@ var require_stringify = __commonJS({
|
|
|
18862
18862
|
if (typeof key === "undefined" || key === null) {
|
|
18863
18863
|
continue;
|
|
18864
18864
|
}
|
|
18865
|
-
var
|
|
18866
|
-
if (options.skipNulls &&
|
|
18865
|
+
var value2 = obj[key];
|
|
18866
|
+
if (options.skipNulls && value2 === null) {
|
|
18867
18867
|
continue;
|
|
18868
18868
|
}
|
|
18869
18869
|
pushToArray(keys, stringify(
|
|
18870
|
-
|
|
18870
|
+
value2,
|
|
18871
18871
|
key,
|
|
18872
18872
|
generateArrayPrefix,
|
|
18873
18873
|
commaRoundTrip,
|
|
@@ -19248,8 +19248,8 @@ var require_lib = __commonJS({
|
|
|
19248
19248
|
// ../../node_modules/.pnpm/lodash.identity@3.0.0/node_modules/lodash.identity/index.js
|
|
19249
19249
|
var require_lodash = __commonJS({
|
|
19250
19250
|
"../../node_modules/.pnpm/lodash.identity@3.0.0/node_modules/lodash.identity/index.js"(exports, module) {
|
|
19251
|
-
function identity(
|
|
19252
|
-
return
|
|
19251
|
+
function identity(value2) {
|
|
19252
|
+
return value2;
|
|
19253
19253
|
}
|
|
19254
19254
|
module.exports = identity;
|
|
19255
19255
|
}
|
|
@@ -19346,18 +19346,18 @@ var require_lodash2 = __commonJS({
|
|
|
19346
19346
|
return result;
|
|
19347
19347
|
}
|
|
19348
19348
|
function baseUnary(func) {
|
|
19349
|
-
return function(
|
|
19350
|
-
return func(
|
|
19349
|
+
return function(value2) {
|
|
19350
|
+
return func(value2);
|
|
19351
19351
|
};
|
|
19352
19352
|
}
|
|
19353
19353
|
function getValue(object, key) {
|
|
19354
19354
|
return object == null ? void 0 : object[key];
|
|
19355
19355
|
}
|
|
19356
|
-
function isHostObject(
|
|
19356
|
+
function isHostObject(value2) {
|
|
19357
19357
|
var result = false;
|
|
19358
|
-
if (
|
|
19358
|
+
if (value2 != null && typeof value2.toString != "function") {
|
|
19359
19359
|
try {
|
|
19360
|
-
result = !!(
|
|
19360
|
+
result = !!(value2 + "");
|
|
19361
19361
|
} catch (e) {
|
|
19362
19362
|
}
|
|
19363
19363
|
}
|
|
@@ -19365,8 +19365,8 @@ var require_lodash2 = __commonJS({
|
|
|
19365
19365
|
}
|
|
19366
19366
|
function mapToArray(map) {
|
|
19367
19367
|
var index = -1, result = Array(map.size);
|
|
19368
|
-
map.forEach(function(
|
|
19369
|
-
result[++index] = [key,
|
|
19368
|
+
map.forEach(function(value2, key) {
|
|
19369
|
+
result[++index] = [key, value2];
|
|
19370
19370
|
});
|
|
19371
19371
|
return result;
|
|
19372
19372
|
}
|
|
@@ -19377,8 +19377,8 @@ var require_lodash2 = __commonJS({
|
|
|
19377
19377
|
}
|
|
19378
19378
|
function setToArray(set) {
|
|
19379
19379
|
var index = -1, result = Array(set.size);
|
|
19380
|
-
set.forEach(function(
|
|
19381
|
-
result[++index] =
|
|
19380
|
+
set.forEach(function(value2) {
|
|
19381
|
+
result[++index] = value2;
|
|
19382
19382
|
});
|
|
19383
19383
|
return result;
|
|
19384
19384
|
}
|
|
@@ -19443,9 +19443,9 @@ var require_lodash2 = __commonJS({
|
|
|
19443
19443
|
var data = this.__data__;
|
|
19444
19444
|
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
19445
19445
|
}
|
|
19446
|
-
function hashSet(key,
|
|
19446
|
+
function hashSet(key, value2) {
|
|
19447
19447
|
var data = this.__data__;
|
|
19448
|
-
data[key] = nativeCreate &&
|
|
19448
|
+
data[key] = nativeCreate && value2 === void 0 ? HASH_UNDEFINED : value2;
|
|
19449
19449
|
return this;
|
|
19450
19450
|
}
|
|
19451
19451
|
Hash.prototype.clear = hashClear;
|
|
@@ -19484,12 +19484,12 @@ var require_lodash2 = __commonJS({
|
|
|
19484
19484
|
function listCacheHas(key) {
|
|
19485
19485
|
return assocIndexOf(this.__data__, key) > -1;
|
|
19486
19486
|
}
|
|
19487
|
-
function listCacheSet(key,
|
|
19487
|
+
function listCacheSet(key, value2) {
|
|
19488
19488
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
19489
19489
|
if (index < 0) {
|
|
19490
|
-
data.push([key,
|
|
19490
|
+
data.push([key, value2]);
|
|
19491
19491
|
} else {
|
|
19492
|
-
data[index][1] =
|
|
19492
|
+
data[index][1] = value2;
|
|
19493
19493
|
}
|
|
19494
19494
|
return this;
|
|
19495
19495
|
}
|
|
@@ -19522,8 +19522,8 @@ var require_lodash2 = __commonJS({
|
|
|
19522
19522
|
function mapCacheHas(key) {
|
|
19523
19523
|
return getMapData(this, key).has(key);
|
|
19524
19524
|
}
|
|
19525
|
-
function mapCacheSet(key,
|
|
19526
|
-
getMapData(this, key).set(key,
|
|
19525
|
+
function mapCacheSet(key, value2) {
|
|
19526
|
+
getMapData(this, key).set(key, value2);
|
|
19527
19527
|
return this;
|
|
19528
19528
|
}
|
|
19529
19529
|
MapCache.prototype.clear = mapCacheClear;
|
|
@@ -19538,12 +19538,12 @@ var require_lodash2 = __commonJS({
|
|
|
19538
19538
|
this.add(values[index]);
|
|
19539
19539
|
}
|
|
19540
19540
|
}
|
|
19541
|
-
function setCacheAdd(
|
|
19542
|
-
this.__data__.set(
|
|
19541
|
+
function setCacheAdd(value2) {
|
|
19542
|
+
this.__data__.set(value2, HASH_UNDEFINED);
|
|
19543
19543
|
return this;
|
|
19544
19544
|
}
|
|
19545
|
-
function setCacheHas(
|
|
19546
|
-
return this.__data__.has(
|
|
19545
|
+
function setCacheHas(value2) {
|
|
19546
|
+
return this.__data__.has(value2);
|
|
19547
19547
|
}
|
|
19548
19548
|
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
19549
19549
|
SetCache.prototype.has = setCacheHas;
|
|
@@ -19562,17 +19562,17 @@ var require_lodash2 = __commonJS({
|
|
|
19562
19562
|
function stackHas(key) {
|
|
19563
19563
|
return this.__data__.has(key);
|
|
19564
19564
|
}
|
|
19565
|
-
function stackSet(key,
|
|
19565
|
+
function stackSet(key, value2) {
|
|
19566
19566
|
var cache = this.__data__;
|
|
19567
19567
|
if (cache instanceof ListCache) {
|
|
19568
19568
|
var pairs = cache.__data__;
|
|
19569
19569
|
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
19570
|
-
pairs.push([key,
|
|
19570
|
+
pairs.push([key, value2]);
|
|
19571
19571
|
return this;
|
|
19572
19572
|
}
|
|
19573
19573
|
cache = this.__data__ = new MapCache(pairs);
|
|
19574
19574
|
}
|
|
19575
|
-
cache.set(key,
|
|
19575
|
+
cache.set(key, value2);
|
|
19576
19576
|
return this;
|
|
19577
19577
|
}
|
|
19578
19578
|
Stack.prototype.clear = stackClear;
|
|
@@ -19580,11 +19580,11 @@ var require_lodash2 = __commonJS({
|
|
|
19580
19580
|
Stack.prototype.get = stackGet;
|
|
19581
19581
|
Stack.prototype.has = stackHas;
|
|
19582
19582
|
Stack.prototype.set = stackSet;
|
|
19583
|
-
function arrayLikeKeys(
|
|
19584
|
-
var result = isArray(
|
|
19583
|
+
function arrayLikeKeys(value2, inherited) {
|
|
19584
|
+
var result = isArray(value2) || isArguments(value2) ? baseTimes(value2.length, String) : [];
|
|
19585
19585
|
var length = result.length, skipIndexes = !!length;
|
|
19586
|
-
for (var key in
|
|
19587
|
-
if ((inherited || hasOwnProperty.call(
|
|
19586
|
+
for (var key in value2) {
|
|
19587
|
+
if ((inherited || hasOwnProperty.call(value2, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) {
|
|
19588
19588
|
result.push(key);
|
|
19589
19589
|
}
|
|
19590
19590
|
}
|
|
@@ -19611,20 +19611,20 @@ var require_lodash2 = __commonJS({
|
|
|
19611
19611
|
var result = keysFunc(object);
|
|
19612
19612
|
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
19613
19613
|
}
|
|
19614
|
-
function baseGetTag(
|
|
19615
|
-
return objectToString.call(
|
|
19614
|
+
function baseGetTag(value2) {
|
|
19615
|
+
return objectToString.call(value2);
|
|
19616
19616
|
}
|
|
19617
19617
|
function baseHasIn(object, key) {
|
|
19618
19618
|
return object != null && key in Object(object);
|
|
19619
19619
|
}
|
|
19620
|
-
function baseIsEqual(
|
|
19621
|
-
if (
|
|
19620
|
+
function baseIsEqual(value2, other, customizer, bitmask, stack) {
|
|
19621
|
+
if (value2 === other) {
|
|
19622
19622
|
return true;
|
|
19623
19623
|
}
|
|
19624
|
-
if (
|
|
19625
|
-
return
|
|
19624
|
+
if (value2 == null || other == null || !isObject(value2) && !isObjectLike(other)) {
|
|
19625
|
+
return value2 !== value2 && other !== other;
|
|
19626
19626
|
}
|
|
19627
|
-
return baseIsEqualDeep(
|
|
19627
|
+
return baseIsEqualDeep(value2, other, baseIsEqual, customizer, bitmask, stack);
|
|
19628
19628
|
}
|
|
19629
19629
|
function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
|
|
19630
19630
|
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag;
|
|
@@ -19686,27 +19686,27 @@ var require_lodash2 = __commonJS({
|
|
|
19686
19686
|
}
|
|
19687
19687
|
return true;
|
|
19688
19688
|
}
|
|
19689
|
-
function baseIsNative(
|
|
19690
|
-
if (!isObject(
|
|
19689
|
+
function baseIsNative(value2) {
|
|
19690
|
+
if (!isObject(value2) || isMasked(value2)) {
|
|
19691
19691
|
return false;
|
|
19692
19692
|
}
|
|
19693
|
-
var pattern = isFunction(
|
|
19694
|
-
return pattern.test(toSource(
|
|
19693
|
+
var pattern = isFunction(value2) || isHostObject(value2) ? reIsNative : reIsHostCtor;
|
|
19694
|
+
return pattern.test(toSource(value2));
|
|
19695
19695
|
}
|
|
19696
|
-
function baseIsTypedArray(
|
|
19697
|
-
return isObjectLike(
|
|
19696
|
+
function baseIsTypedArray(value2) {
|
|
19697
|
+
return isObjectLike(value2) && isLength(value2.length) && !!typedArrayTags[objectToString.call(value2)];
|
|
19698
19698
|
}
|
|
19699
|
-
function baseIteratee(
|
|
19700
|
-
if (typeof
|
|
19701
|
-
return
|
|
19699
|
+
function baseIteratee(value2) {
|
|
19700
|
+
if (typeof value2 == "function") {
|
|
19701
|
+
return value2;
|
|
19702
19702
|
}
|
|
19703
|
-
if (
|
|
19703
|
+
if (value2 == null) {
|
|
19704
19704
|
return identity;
|
|
19705
19705
|
}
|
|
19706
|
-
if (typeof
|
|
19707
|
-
return isArray(
|
|
19706
|
+
if (typeof value2 == "object") {
|
|
19707
|
+
return isArray(value2) ? baseMatchesProperty(value2[0], value2[1]) : baseMatches(value2);
|
|
19708
19708
|
}
|
|
19709
|
-
return property(
|
|
19709
|
+
return property(value2);
|
|
19710
19710
|
}
|
|
19711
19711
|
function baseKeys(object) {
|
|
19712
19712
|
if (!isPrototype(object)) {
|
|
@@ -19753,9 +19753,9 @@ var require_lodash2 = __commonJS({
|
|
|
19753
19753
|
function basePickBy(object, props, predicate) {
|
|
19754
19754
|
var index = -1, length = props.length, result = {};
|
|
19755
19755
|
while (++index < length) {
|
|
19756
|
-
var key = props[index],
|
|
19757
|
-
if (predicate(
|
|
19758
|
-
result[key] =
|
|
19756
|
+
var key = props[index], value2 = object[key];
|
|
19757
|
+
if (predicate(value2, key)) {
|
|
19758
|
+
result[key] = value2;
|
|
19759
19759
|
}
|
|
19760
19760
|
}
|
|
19761
19761
|
return result;
|
|
@@ -19765,18 +19765,18 @@ var require_lodash2 = __commonJS({
|
|
|
19765
19765
|
return baseGet(object, path);
|
|
19766
19766
|
};
|
|
19767
19767
|
}
|
|
19768
|
-
function baseToString(
|
|
19769
|
-
if (typeof
|
|
19770
|
-
return
|
|
19768
|
+
function baseToString(value2) {
|
|
19769
|
+
if (typeof value2 == "string") {
|
|
19770
|
+
return value2;
|
|
19771
19771
|
}
|
|
19772
|
-
if (isSymbol(
|
|
19773
|
-
return symbolToString ? symbolToString.call(
|
|
19772
|
+
if (isSymbol(value2)) {
|
|
19773
|
+
return symbolToString ? symbolToString.call(value2) : "";
|
|
19774
19774
|
}
|
|
19775
|
-
var result =
|
|
19776
|
-
return result == "0" && 1 /
|
|
19775
|
+
var result = value2 + "";
|
|
19776
|
+
return result == "0" && 1 / value2 == -INFINITY ? "-0" : result;
|
|
19777
19777
|
}
|
|
19778
|
-
function castPath(
|
|
19779
|
-
return isArray(
|
|
19778
|
+
function castPath(value2) {
|
|
19779
|
+
return isArray(value2) ? value2 : stringToPath(value2);
|
|
19780
19780
|
}
|
|
19781
19781
|
function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
|
|
19782
19782
|
var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length;
|
|
@@ -19918,14 +19918,14 @@ var require_lodash2 = __commonJS({
|
|
|
19918
19918
|
function getMatchData(object) {
|
|
19919
19919
|
var result = keys(object), length = result.length;
|
|
19920
19920
|
while (length--) {
|
|
19921
|
-
var key = result[length],
|
|
19922
|
-
result[length] = [key,
|
|
19921
|
+
var key = result[length], value2 = object[key];
|
|
19922
|
+
result[length] = [key, value2, isStrictComparable(value2)];
|
|
19923
19923
|
}
|
|
19924
19924
|
return result;
|
|
19925
19925
|
}
|
|
19926
19926
|
function getNative(object, key) {
|
|
19927
|
-
var
|
|
19928
|
-
return baseIsNative(
|
|
19927
|
+
var value2 = getValue(object, key);
|
|
19928
|
+
return baseIsNative(value2) ? value2 : void 0;
|
|
19929
19929
|
}
|
|
19930
19930
|
var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
|
|
19931
19931
|
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
@@ -19938,8 +19938,8 @@ var require_lodash2 = __commonJS({
|
|
|
19938
19938
|
};
|
|
19939
19939
|
var getTag = baseGetTag;
|
|
19940
19940
|
if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
|
|
19941
|
-
getTag = function(
|
|
19942
|
-
var result = objectToString.call(
|
|
19941
|
+
getTag = function(value2) {
|
|
19942
|
+
var result = objectToString.call(value2), Ctor = result == objectTag ? value2.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
|
|
19943
19943
|
if (ctorString) {
|
|
19944
19944
|
switch (ctorString) {
|
|
19945
19945
|
case dataViewCtorString:
|
|
@@ -19973,33 +19973,33 @@ var require_lodash2 = __commonJS({
|
|
|
19973
19973
|
var length = object ? object.length : 0;
|
|
19974
19974
|
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
|
|
19975
19975
|
}
|
|
19976
|
-
function isIndex(
|
|
19976
|
+
function isIndex(value2, length) {
|
|
19977
19977
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
19978
|
-
return !!length && (typeof
|
|
19978
|
+
return !!length && (typeof value2 == "number" || reIsUint.test(value2)) && (value2 > -1 && value2 % 1 == 0 && value2 < length);
|
|
19979
19979
|
}
|
|
19980
|
-
function isKey(
|
|
19981
|
-
if (isArray(
|
|
19980
|
+
function isKey(value2, object) {
|
|
19981
|
+
if (isArray(value2)) {
|
|
19982
19982
|
return false;
|
|
19983
19983
|
}
|
|
19984
|
-
var type = typeof
|
|
19985
|
-
if (type == "number" || type == "symbol" || type == "boolean" ||
|
|
19984
|
+
var type = typeof value2;
|
|
19985
|
+
if (type == "number" || type == "symbol" || type == "boolean" || value2 == null || isSymbol(value2)) {
|
|
19986
19986
|
return true;
|
|
19987
19987
|
}
|
|
19988
|
-
return reIsPlainProp.test(
|
|
19988
|
+
return reIsPlainProp.test(value2) || !reIsDeepProp.test(value2) || object != null && value2 in Object(object);
|
|
19989
19989
|
}
|
|
19990
|
-
function isKeyable(
|
|
19991
|
-
var type = typeof
|
|
19992
|
-
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ?
|
|
19990
|
+
function isKeyable(value2) {
|
|
19991
|
+
var type = typeof value2;
|
|
19992
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value2 !== "__proto__" : value2 === null;
|
|
19993
19993
|
}
|
|
19994
19994
|
function isMasked(func) {
|
|
19995
19995
|
return !!maskSrcKey && maskSrcKey in func;
|
|
19996
19996
|
}
|
|
19997
|
-
function isPrototype(
|
|
19998
|
-
var Ctor =
|
|
19999
|
-
return
|
|
19997
|
+
function isPrototype(value2) {
|
|
19998
|
+
var Ctor = value2 && value2.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
19999
|
+
return value2 === proto;
|
|
20000
20000
|
}
|
|
20001
|
-
function isStrictComparable(
|
|
20002
|
-
return
|
|
20001
|
+
function isStrictComparable(value2) {
|
|
20002
|
+
return value2 === value2 && !isObject(value2);
|
|
20003
20003
|
}
|
|
20004
20004
|
function matchesStrictComparable(key, srcValue) {
|
|
20005
20005
|
return function(object) {
|
|
@@ -20029,12 +20029,12 @@ var require_lodash2 = __commonJS({
|
|
|
20029
20029
|
});
|
|
20030
20030
|
return result;
|
|
20031
20031
|
});
|
|
20032
|
-
function toKey(
|
|
20033
|
-
if (typeof
|
|
20034
|
-
return
|
|
20032
|
+
function toKey(value2) {
|
|
20033
|
+
if (typeof value2 == "string" || isSymbol(value2)) {
|
|
20034
|
+
return value2;
|
|
20035
20035
|
}
|
|
20036
|
-
var result =
|
|
20037
|
-
return result == "0" && 1 /
|
|
20036
|
+
var result = value2 + "";
|
|
20037
|
+
return result == "0" && 1 / value2 == -INFINITY ? "-0" : result;
|
|
20038
20038
|
}
|
|
20039
20039
|
function toSource(func) {
|
|
20040
20040
|
if (func != null) {
|
|
@@ -20066,39 +20066,39 @@ var require_lodash2 = __commonJS({
|
|
|
20066
20066
|
return memoized;
|
|
20067
20067
|
}
|
|
20068
20068
|
memoize.Cache = MapCache;
|
|
20069
|
-
function eq(
|
|
20070
|
-
return
|
|
20069
|
+
function eq(value2, other) {
|
|
20070
|
+
return value2 === other || value2 !== value2 && other !== other;
|
|
20071
20071
|
}
|
|
20072
|
-
function isArguments(
|
|
20073
|
-
return isArrayLikeObject(
|
|
20072
|
+
function isArguments(value2) {
|
|
20073
|
+
return isArrayLikeObject(value2) && hasOwnProperty.call(value2, "callee") && (!propertyIsEnumerable.call(value2, "callee") || objectToString.call(value2) == argsTag);
|
|
20074
20074
|
}
|
|
20075
20075
|
var isArray = Array.isArray;
|
|
20076
|
-
function isArrayLike(
|
|
20077
|
-
return
|
|
20076
|
+
function isArrayLike(value2) {
|
|
20077
|
+
return value2 != null && isLength(value2.length) && !isFunction(value2);
|
|
20078
20078
|
}
|
|
20079
|
-
function isArrayLikeObject(
|
|
20080
|
-
return isObjectLike(
|
|
20079
|
+
function isArrayLikeObject(value2) {
|
|
20080
|
+
return isObjectLike(value2) && isArrayLike(value2);
|
|
20081
20081
|
}
|
|
20082
|
-
function isFunction(
|
|
20083
|
-
var tag = isObject(
|
|
20082
|
+
function isFunction(value2) {
|
|
20083
|
+
var tag = isObject(value2) ? objectToString.call(value2) : "";
|
|
20084
20084
|
return tag == funcTag || tag == genTag;
|
|
20085
20085
|
}
|
|
20086
|
-
function isLength(
|
|
20087
|
-
return typeof
|
|
20086
|
+
function isLength(value2) {
|
|
20087
|
+
return typeof value2 == "number" && value2 > -1 && value2 % 1 == 0 && value2 <= MAX_SAFE_INTEGER;
|
|
20088
20088
|
}
|
|
20089
|
-
function isObject(
|
|
20090
|
-
var type = typeof
|
|
20091
|
-
return !!
|
|
20089
|
+
function isObject(value2) {
|
|
20090
|
+
var type = typeof value2;
|
|
20091
|
+
return !!value2 && (type == "object" || type == "function");
|
|
20092
20092
|
}
|
|
20093
|
-
function isObjectLike(
|
|
20094
|
-
return !!
|
|
20093
|
+
function isObjectLike(value2) {
|
|
20094
|
+
return !!value2 && typeof value2 == "object";
|
|
20095
20095
|
}
|
|
20096
|
-
function isSymbol(
|
|
20097
|
-
return typeof
|
|
20096
|
+
function isSymbol(value2) {
|
|
20097
|
+
return typeof value2 == "symbol" || isObjectLike(value2) && objectToString.call(value2) == symbolTag;
|
|
20098
20098
|
}
|
|
20099
20099
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
20100
|
-
function toString(
|
|
20101
|
-
return
|
|
20100
|
+
function toString(value2) {
|
|
20101
|
+
return value2 == null ? "" : baseToString(value2);
|
|
20102
20102
|
}
|
|
20103
20103
|
function get(object, path, defaultValue) {
|
|
20104
20104
|
var result = object == null ? void 0 : baseGet(object, path);
|
|
@@ -20116,8 +20116,8 @@ var require_lodash2 = __commonJS({
|
|
|
20116
20116
|
function pickBy(object, predicate) {
|
|
20117
20117
|
return object == null ? {} : basePickBy(object, getAllKeysIn(object), baseIteratee(predicate));
|
|
20118
20118
|
}
|
|
20119
|
-
function identity(
|
|
20120
|
-
return
|
|
20119
|
+
function identity(value2) {
|
|
20120
|
+
return value2;
|
|
20121
20121
|
}
|
|
20122
20122
|
function property(path) {
|
|
20123
20123
|
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
@@ -20211,8 +20211,8 @@ var require_lodash3 = __commonJS({
|
|
|
20211
20211
|
return result;
|
|
20212
20212
|
}
|
|
20213
20213
|
function baseUnary(func) {
|
|
20214
|
-
return function(
|
|
20215
|
-
return func(
|
|
20214
|
+
return function(value2) {
|
|
20215
|
+
return func(value2);
|
|
20216
20216
|
};
|
|
20217
20217
|
}
|
|
20218
20218
|
function getValue(object, key) {
|
|
@@ -20305,10 +20305,10 @@ var require_lodash3 = __commonJS({
|
|
|
20305
20305
|
var data = this.__data__;
|
|
20306
20306
|
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
20307
20307
|
}
|
|
20308
|
-
function hashSet(key,
|
|
20308
|
+
function hashSet(key, value2) {
|
|
20309
20309
|
var data = this.__data__;
|
|
20310
20310
|
this.size += this.has(key) ? 0 : 1;
|
|
20311
|
-
data[key] = nativeCreate &&
|
|
20311
|
+
data[key] = nativeCreate && value2 === void 0 ? HASH_UNDEFINED : value2;
|
|
20312
20312
|
return this;
|
|
20313
20313
|
}
|
|
20314
20314
|
Hash.prototype.clear = hashClear;
|
|
@@ -20349,13 +20349,13 @@ var require_lodash3 = __commonJS({
|
|
|
20349
20349
|
function listCacheHas(key) {
|
|
20350
20350
|
return assocIndexOf(this.__data__, key) > -1;
|
|
20351
20351
|
}
|
|
20352
|
-
function listCacheSet(key,
|
|
20352
|
+
function listCacheSet(key, value2) {
|
|
20353
20353
|
var data = this.__data__, index = assocIndexOf(data, key);
|
|
20354
20354
|
if (index < 0) {
|
|
20355
20355
|
++this.size;
|
|
20356
|
-
data.push([key,
|
|
20356
|
+
data.push([key, value2]);
|
|
20357
20357
|
} else {
|
|
20358
|
-
data[index][1] =
|
|
20358
|
+
data[index][1] = value2;
|
|
20359
20359
|
}
|
|
20360
20360
|
return this;
|
|
20361
20361
|
}
|
|
@@ -20391,9 +20391,9 @@ var require_lodash3 = __commonJS({
|
|
|
20391
20391
|
function mapCacheHas(key) {
|
|
20392
20392
|
return getMapData(this, key).has(key);
|
|
20393
20393
|
}
|
|
20394
|
-
function mapCacheSet(key,
|
|
20394
|
+
function mapCacheSet(key, value2) {
|
|
20395
20395
|
var data = getMapData(this, key), size = data.size;
|
|
20396
|
-
data.set(key,
|
|
20396
|
+
data.set(key, value2);
|
|
20397
20397
|
this.size += data.size == size ? 0 : 1;
|
|
20398
20398
|
return this;
|
|
20399
20399
|
}
|
|
@@ -20421,18 +20421,18 @@ var require_lodash3 = __commonJS({
|
|
|
20421
20421
|
function stackHas(key) {
|
|
20422
20422
|
return this.__data__.has(key);
|
|
20423
20423
|
}
|
|
20424
|
-
function stackSet(key,
|
|
20424
|
+
function stackSet(key, value2) {
|
|
20425
20425
|
var data = this.__data__;
|
|
20426
20426
|
if (data instanceof ListCache) {
|
|
20427
20427
|
var pairs = data.__data__;
|
|
20428
20428
|
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
20429
|
-
pairs.push([key,
|
|
20429
|
+
pairs.push([key, value2]);
|
|
20430
20430
|
this.size = ++data.size;
|
|
20431
20431
|
return this;
|
|
20432
20432
|
}
|
|
20433
20433
|
data = this.__data__ = new MapCache(pairs);
|
|
20434
20434
|
}
|
|
20435
|
-
data.set(key,
|
|
20435
|
+
data.set(key, value2);
|
|
20436
20436
|
this.size = data.size;
|
|
20437
20437
|
return this;
|
|
20438
20438
|
}
|
|
@@ -20441,10 +20441,10 @@ var require_lodash3 = __commonJS({
|
|
|
20441
20441
|
Stack.prototype.get = stackGet;
|
|
20442
20442
|
Stack.prototype.has = stackHas;
|
|
20443
20443
|
Stack.prototype.set = stackSet;
|
|
20444
|
-
function arrayLikeKeys(
|
|
20445
|
-
var isArr = isArray(
|
|
20446
|
-
for (var key in
|
|
20447
|
-
if ((inherited || hasOwnProperty.call(
|
|
20444
|
+
function arrayLikeKeys(value2, inherited) {
|
|
20445
|
+
var isArr = isArray(value2), isArg = !isArr && isArguments(value2), isBuff = !isArr && !isArg && isBuffer(value2), isType = !isArr && !isArg && !isBuff && isTypedArray(value2), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value2.length, String) : [], length = result.length;
|
|
20446
|
+
for (var key in value2) {
|
|
20447
|
+
if ((inherited || hasOwnProperty.call(value2, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
20448
20448
|
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
20449
20449
|
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
20450
20450
|
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
@@ -20454,15 +20454,15 @@ var require_lodash3 = __commonJS({
|
|
|
20454
20454
|
}
|
|
20455
20455
|
return result;
|
|
20456
20456
|
}
|
|
20457
|
-
function assignMergeValue(object, key,
|
|
20458
|
-
if (
|
|
20459
|
-
baseAssignValue(object, key,
|
|
20457
|
+
function assignMergeValue(object, key, value2) {
|
|
20458
|
+
if (value2 !== void 0 && !eq(object[key], value2) || value2 === void 0 && !(key in object)) {
|
|
20459
|
+
baseAssignValue(object, key, value2);
|
|
20460
20460
|
}
|
|
20461
20461
|
}
|
|
20462
|
-
function assignValue(object, key,
|
|
20462
|
+
function assignValue(object, key, value2) {
|
|
20463
20463
|
var objValue = object[key];
|
|
20464
|
-
if (!(hasOwnProperty.call(object, key) && eq(objValue,
|
|
20465
|
-
baseAssignValue(object, key,
|
|
20464
|
+
if (!(hasOwnProperty.call(object, key) && eq(objValue, value2)) || value2 === void 0 && !(key in object)) {
|
|
20465
|
+
baseAssignValue(object, key, value2);
|
|
20466
20466
|
}
|
|
20467
20467
|
}
|
|
20468
20468
|
function assocIndexOf(array, key) {
|
|
@@ -20474,37 +20474,37 @@ var require_lodash3 = __commonJS({
|
|
|
20474
20474
|
}
|
|
20475
20475
|
return -1;
|
|
20476
20476
|
}
|
|
20477
|
-
function baseAssignValue(object, key,
|
|
20477
|
+
function baseAssignValue(object, key, value2) {
|
|
20478
20478
|
if (key == "__proto__" && defineProperty) {
|
|
20479
20479
|
defineProperty(object, key, {
|
|
20480
20480
|
"configurable": true,
|
|
20481
20481
|
"enumerable": true,
|
|
20482
|
-
"value":
|
|
20482
|
+
"value": value2,
|
|
20483
20483
|
"writable": true
|
|
20484
20484
|
});
|
|
20485
20485
|
} else {
|
|
20486
|
-
object[key] =
|
|
20486
|
+
object[key] = value2;
|
|
20487
20487
|
}
|
|
20488
20488
|
}
|
|
20489
20489
|
var baseFor = createBaseFor();
|
|
20490
|
-
function baseGetTag(
|
|
20491
|
-
if (
|
|
20492
|
-
return
|
|
20490
|
+
function baseGetTag(value2) {
|
|
20491
|
+
if (value2 == null) {
|
|
20492
|
+
return value2 === void 0 ? undefinedTag : nullTag;
|
|
20493
20493
|
}
|
|
20494
|
-
return symToStringTag && symToStringTag in Object(
|
|
20494
|
+
return symToStringTag && symToStringTag in Object(value2) ? getRawTag(value2) : objectToString(value2);
|
|
20495
20495
|
}
|
|
20496
|
-
function baseIsArguments(
|
|
20497
|
-
return isObjectLike(
|
|
20496
|
+
function baseIsArguments(value2) {
|
|
20497
|
+
return isObjectLike(value2) && baseGetTag(value2) == argsTag;
|
|
20498
20498
|
}
|
|
20499
|
-
function baseIsNative(
|
|
20500
|
-
if (!isObject(
|
|
20499
|
+
function baseIsNative(value2) {
|
|
20500
|
+
if (!isObject(value2) || isMasked(value2)) {
|
|
20501
20501
|
return false;
|
|
20502
20502
|
}
|
|
20503
|
-
var pattern = isFunction(
|
|
20504
|
-
return pattern.test(toSource(
|
|
20503
|
+
var pattern = isFunction(value2) ? reIsNative : reIsHostCtor;
|
|
20504
|
+
return pattern.test(toSource(value2));
|
|
20505
20505
|
}
|
|
20506
|
-
function baseIsTypedArray(
|
|
20507
|
-
return isObjectLike(
|
|
20506
|
+
function baseIsTypedArray(value2) {
|
|
20507
|
+
return isObjectLike(value2) && isLength(value2.length) && !!typedArrayTags[baseGetTag(value2)];
|
|
20508
20508
|
}
|
|
20509
20509
|
function baseKeysIn(object) {
|
|
20510
20510
|
if (!isObject(object)) {
|
|
@@ -20667,22 +20667,22 @@ var require_lodash3 = __commonJS({
|
|
|
20667
20667
|
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
20668
20668
|
}
|
|
20669
20669
|
function getNative(object, key) {
|
|
20670
|
-
var
|
|
20671
|
-
return baseIsNative(
|
|
20670
|
+
var value2 = getValue(object, key);
|
|
20671
|
+
return baseIsNative(value2) ? value2 : void 0;
|
|
20672
20672
|
}
|
|
20673
|
-
function getRawTag(
|
|
20674
|
-
var isOwn = hasOwnProperty.call(
|
|
20673
|
+
function getRawTag(value2) {
|
|
20674
|
+
var isOwn = hasOwnProperty.call(value2, symToStringTag), tag = value2[symToStringTag];
|
|
20675
20675
|
try {
|
|
20676
|
-
|
|
20676
|
+
value2[symToStringTag] = void 0;
|
|
20677
20677
|
var unmasked = true;
|
|
20678
20678
|
} catch (e) {
|
|
20679
20679
|
}
|
|
20680
|
-
var result = nativeObjectToString.call(
|
|
20680
|
+
var result = nativeObjectToString.call(value2);
|
|
20681
20681
|
if (unmasked) {
|
|
20682
20682
|
if (isOwn) {
|
|
20683
|
-
|
|
20683
|
+
value2[symToStringTag] = tag;
|
|
20684
20684
|
} else {
|
|
20685
|
-
delete
|
|
20685
|
+
delete value2[symToStringTag];
|
|
20686
20686
|
}
|
|
20687
20687
|
}
|
|
20688
20688
|
return result;
|
|
@@ -20690,31 +20690,31 @@ var require_lodash3 = __commonJS({
|
|
|
20690
20690
|
function initCloneObject(object) {
|
|
20691
20691
|
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
|
20692
20692
|
}
|
|
20693
|
-
function isIndex(
|
|
20694
|
-
var type = typeof
|
|
20693
|
+
function isIndex(value2, length) {
|
|
20694
|
+
var type = typeof value2;
|
|
20695
20695
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
20696
|
-
return !!length && (type == "number" || type != "symbol" && reIsUint.test(
|
|
20696
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value2)) && (value2 > -1 && value2 % 1 == 0 && value2 < length);
|
|
20697
20697
|
}
|
|
20698
|
-
function isIterateeCall(
|
|
20698
|
+
function isIterateeCall(value2, index, object) {
|
|
20699
20699
|
if (!isObject(object)) {
|
|
20700
20700
|
return false;
|
|
20701
20701
|
}
|
|
20702
20702
|
var type = typeof index;
|
|
20703
20703
|
if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
|
|
20704
|
-
return eq(object[index],
|
|
20704
|
+
return eq(object[index], value2);
|
|
20705
20705
|
}
|
|
20706
20706
|
return false;
|
|
20707
20707
|
}
|
|
20708
|
-
function isKeyable(
|
|
20709
|
-
var type = typeof
|
|
20710
|
-
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ?
|
|
20708
|
+
function isKeyable(value2) {
|
|
20709
|
+
var type = typeof value2;
|
|
20710
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value2 !== "__proto__" : value2 === null;
|
|
20711
20711
|
}
|
|
20712
20712
|
function isMasked(func) {
|
|
20713
20713
|
return !!maskSrcKey && maskSrcKey in func;
|
|
20714
20714
|
}
|
|
20715
|
-
function isPrototype(
|
|
20716
|
-
var Ctor =
|
|
20717
|
-
return
|
|
20715
|
+
function isPrototype(value2) {
|
|
20716
|
+
var Ctor = value2 && value2.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
20717
|
+
return value2 === proto;
|
|
20718
20718
|
}
|
|
20719
20719
|
function nativeKeysIn(object) {
|
|
20720
20720
|
var result = [];
|
|
@@ -20725,8 +20725,8 @@ var require_lodash3 = __commonJS({
|
|
|
20725
20725
|
}
|
|
20726
20726
|
return result;
|
|
20727
20727
|
}
|
|
20728
|
-
function objectToString(
|
|
20729
|
-
return nativeObjectToString.call(
|
|
20728
|
+
function objectToString(value2) {
|
|
20729
|
+
return nativeObjectToString.call(value2);
|
|
20730
20730
|
}
|
|
20731
20731
|
function overRest(func, start, transform) {
|
|
20732
20732
|
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
@@ -20782,44 +20782,44 @@ var require_lodash3 = __commonJS({
|
|
|
20782
20782
|
}
|
|
20783
20783
|
return "";
|
|
20784
20784
|
}
|
|
20785
|
-
function eq(
|
|
20786
|
-
return
|
|
20785
|
+
function eq(value2, other) {
|
|
20786
|
+
return value2 === other || value2 !== value2 && other !== other;
|
|
20787
20787
|
}
|
|
20788
20788
|
var isArguments = baseIsArguments(/* @__PURE__ */ (function() {
|
|
20789
20789
|
return arguments;
|
|
20790
|
-
})()) ? baseIsArguments : function(
|
|
20791
|
-
return isObjectLike(
|
|
20790
|
+
})()) ? baseIsArguments : function(value2) {
|
|
20791
|
+
return isObjectLike(value2) && hasOwnProperty.call(value2, "callee") && !propertyIsEnumerable.call(value2, "callee");
|
|
20792
20792
|
};
|
|
20793
20793
|
var isArray = Array.isArray;
|
|
20794
|
-
function isArrayLike(
|
|
20795
|
-
return
|
|
20794
|
+
function isArrayLike(value2) {
|
|
20795
|
+
return value2 != null && isLength(value2.length) && !isFunction(value2);
|
|
20796
20796
|
}
|
|
20797
|
-
function isArrayLikeObject(
|
|
20798
|
-
return isObjectLike(
|
|
20797
|
+
function isArrayLikeObject(value2) {
|
|
20798
|
+
return isObjectLike(value2) && isArrayLike(value2);
|
|
20799
20799
|
}
|
|
20800
20800
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
20801
|
-
function isFunction(
|
|
20802
|
-
if (!isObject(
|
|
20801
|
+
function isFunction(value2) {
|
|
20802
|
+
if (!isObject(value2)) {
|
|
20803
20803
|
return false;
|
|
20804
20804
|
}
|
|
20805
|
-
var tag = baseGetTag(
|
|
20805
|
+
var tag = baseGetTag(value2);
|
|
20806
20806
|
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
20807
20807
|
}
|
|
20808
|
-
function isLength(
|
|
20809
|
-
return typeof
|
|
20808
|
+
function isLength(value2) {
|
|
20809
|
+
return typeof value2 == "number" && value2 > -1 && value2 % 1 == 0 && value2 <= MAX_SAFE_INTEGER;
|
|
20810
20810
|
}
|
|
20811
|
-
function isObject(
|
|
20812
|
-
var type = typeof
|
|
20813
|
-
return
|
|
20811
|
+
function isObject(value2) {
|
|
20812
|
+
var type = typeof value2;
|
|
20813
|
+
return value2 != null && (type == "object" || type == "function");
|
|
20814
20814
|
}
|
|
20815
|
-
function isObjectLike(
|
|
20816
|
-
return
|
|
20815
|
+
function isObjectLike(value2) {
|
|
20816
|
+
return value2 != null && typeof value2 == "object";
|
|
20817
20817
|
}
|
|
20818
|
-
function isPlainObject(
|
|
20819
|
-
if (!isObjectLike(
|
|
20818
|
+
function isPlainObject(value2) {
|
|
20819
|
+
if (!isObjectLike(value2) || baseGetTag(value2) != objectTag) {
|
|
20820
20820
|
return false;
|
|
20821
20821
|
}
|
|
20822
|
-
var proto = getPrototype(
|
|
20822
|
+
var proto = getPrototype(value2);
|
|
20823
20823
|
if (proto === null) {
|
|
20824
20824
|
return true;
|
|
20825
20825
|
}
|
|
@@ -20827,8 +20827,8 @@ var require_lodash3 = __commonJS({
|
|
|
20827
20827
|
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
20828
20828
|
}
|
|
20829
20829
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
20830
|
-
function toPlainObject(
|
|
20831
|
-
return copyObject(
|
|
20830
|
+
function toPlainObject(value2) {
|
|
20831
|
+
return copyObject(value2, keysIn(value2));
|
|
20832
20832
|
}
|
|
20833
20833
|
function keysIn(object) {
|
|
20834
20834
|
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
@@ -20836,13 +20836,13 @@ var require_lodash3 = __commonJS({
|
|
|
20836
20836
|
var merge = createAssigner(function(object, source, srcIndex) {
|
|
20837
20837
|
baseMerge(object, source, srcIndex);
|
|
20838
20838
|
});
|
|
20839
|
-
function constant(
|
|
20839
|
+
function constant(value2) {
|
|
20840
20840
|
return function() {
|
|
20841
|
-
return
|
|
20841
|
+
return value2;
|
|
20842
20842
|
};
|
|
20843
20843
|
}
|
|
20844
|
-
function identity(
|
|
20845
|
-
return
|
|
20844
|
+
function identity(value2) {
|
|
20845
|
+
return value2;
|
|
20846
20846
|
}
|
|
20847
20847
|
function stubFalse() {
|
|
20848
20848
|
return false;
|
|
@@ -21397,43 +21397,43 @@ var require_permessage_deflate = __commonJS({
|
|
|
21397
21397
|
normalizeParams(configurations) {
|
|
21398
21398
|
configurations.forEach((params) => {
|
|
21399
21399
|
Object.keys(params).forEach((key) => {
|
|
21400
|
-
let
|
|
21401
|
-
if (
|
|
21400
|
+
let value2 = params[key];
|
|
21401
|
+
if (value2.length > 1) {
|
|
21402
21402
|
throw new Error(`Parameter "${key}" must have only a single value`);
|
|
21403
21403
|
}
|
|
21404
|
-
|
|
21404
|
+
value2 = value2[0];
|
|
21405
21405
|
if (key === "client_max_window_bits") {
|
|
21406
|
-
if (
|
|
21407
|
-
const num = +
|
|
21406
|
+
if (value2 !== true) {
|
|
21407
|
+
const num = +value2;
|
|
21408
21408
|
if (!Number.isInteger(num) || num < 8 || num > 15) {
|
|
21409
21409
|
throw new TypeError(
|
|
21410
|
-
`Invalid value for parameter "${key}": ${
|
|
21410
|
+
`Invalid value for parameter "${key}": ${value2}`
|
|
21411
21411
|
);
|
|
21412
21412
|
}
|
|
21413
|
-
|
|
21413
|
+
value2 = num;
|
|
21414
21414
|
} else if (!this._isServer) {
|
|
21415
21415
|
throw new TypeError(
|
|
21416
|
-
`Invalid value for parameter "${key}": ${
|
|
21416
|
+
`Invalid value for parameter "${key}": ${value2}`
|
|
21417
21417
|
);
|
|
21418
21418
|
}
|
|
21419
21419
|
} else if (key === "server_max_window_bits") {
|
|
21420
|
-
const num = +
|
|
21420
|
+
const num = +value2;
|
|
21421
21421
|
if (!Number.isInteger(num) || num < 8 || num > 15) {
|
|
21422
21422
|
throw new TypeError(
|
|
21423
|
-
`Invalid value for parameter "${key}": ${
|
|
21423
|
+
`Invalid value for parameter "${key}": ${value2}`
|
|
21424
21424
|
);
|
|
21425
21425
|
}
|
|
21426
|
-
|
|
21426
|
+
value2 = num;
|
|
21427
21427
|
} else if (key === "client_no_context_takeover" || key === "server_no_context_takeover") {
|
|
21428
|
-
if (
|
|
21428
|
+
if (value2 !== true) {
|
|
21429
21429
|
throw new TypeError(
|
|
21430
|
-
`Invalid value for parameter "${key}": ${
|
|
21430
|
+
`Invalid value for parameter "${key}": ${value2}`
|
|
21431
21431
|
);
|
|
21432
21432
|
}
|
|
21433
21433
|
} else {
|
|
21434
21434
|
throw new Error(`Unknown parameter "${key}"`);
|
|
21435
21435
|
}
|
|
21436
|
-
params[key] =
|
|
21436
|
+
params[key] = value2;
|
|
21437
21437
|
});
|
|
21438
21438
|
});
|
|
21439
21439
|
return configurations;
|
|
@@ -21819,8 +21819,8 @@ var require_validation = __commonJS({
|
|
|
21819
21819
|
}
|
|
21820
21820
|
return true;
|
|
21821
21821
|
}
|
|
21822
|
-
function isBlob(
|
|
21823
|
-
return hasBlob && typeof
|
|
21822
|
+
function isBlob(value2) {
|
|
21823
|
+
return hasBlob && typeof value2 === "object" && typeof value2.arrayBuffer === "function" && typeof value2.type === "string" && typeof value2.stream === "function" && (value2[Symbol.toStringTag] === "Blob" || value2[Symbol.toStringTag] === "File");
|
|
21824
21824
|
}
|
|
21825
21825
|
module.exports = {
|
|
21826
21826
|
isBlob,
|
|
@@ -23295,12 +23295,12 @@ var require_extension = __commonJS({
|
|
|
23295
23295
|
throw new SyntaxError(`Unexpected character at index ${i}`);
|
|
23296
23296
|
}
|
|
23297
23297
|
if (end === -1) end = i;
|
|
23298
|
-
let
|
|
23298
|
+
let value2 = header.slice(start, end);
|
|
23299
23299
|
if (mustUnescape) {
|
|
23300
|
-
|
|
23300
|
+
value2 = value2.replace(/\\/g, "");
|
|
23301
23301
|
mustUnescape = false;
|
|
23302
23302
|
}
|
|
23303
|
-
push(params, paramName,
|
|
23303
|
+
push(params, paramName, value2);
|
|
23304
23304
|
if (code2 === 44) {
|
|
23305
23305
|
push(offers, extensionName, params);
|
|
23306
23306
|
params = /* @__PURE__ */ Object.create(null);
|
|
@@ -23960,8 +23960,8 @@ var require_websocket = __commonJS({
|
|
|
23960
23960
|
const headers = options && options.headers;
|
|
23961
23961
|
options = { ...options, headers: {} };
|
|
23962
23962
|
if (headers) {
|
|
23963
|
-
for (const [key2,
|
|
23964
|
-
options.headers[key2.toLowerCase()] =
|
|
23963
|
+
for (const [key2, value2] of Object.entries(headers)) {
|
|
23964
|
+
options.headers[key2.toLowerCase()] = value2;
|
|
23965
23965
|
}
|
|
23966
23966
|
}
|
|
23967
23967
|
} else if (websocket.listenerCount("redirect") === 0) {
|
|
@@ -24721,10 +24721,10 @@ var require_websocket_server = __commonJS({
|
|
|
24721
24721
|
}
|
|
24722
24722
|
if (extensions[PerMessageDeflate.extensionName]) {
|
|
24723
24723
|
const params = extensions[PerMessageDeflate.extensionName].params;
|
|
24724
|
-
const
|
|
24724
|
+
const value2 = extension.format({
|
|
24725
24725
|
[PerMessageDeflate.extensionName]: [params]
|
|
24726
24726
|
});
|
|
24727
|
-
headers.push(`Sec-WebSocket-Extensions: ${
|
|
24727
|
+
headers.push(`Sec-WebSocket-Extensions: ${value2}`);
|
|
24728
24728
|
ws._extensions = extensions;
|
|
24729
24729
|
}
|
|
24730
24730
|
this.emit("headers", headers, req);
|
|
@@ -25326,13 +25326,13 @@ var require_longbits = __commonJS({
|
|
|
25326
25326
|
return 1;
|
|
25327
25327
|
};
|
|
25328
25328
|
var zeroHash = LongBits.zeroHash = "\0\0\0\0\0\0\0\0";
|
|
25329
|
-
LongBits.fromNumber = function fromNumber(
|
|
25330
|
-
if (
|
|
25329
|
+
LongBits.fromNumber = function fromNumber(value2) {
|
|
25330
|
+
if (value2 === 0)
|
|
25331
25331
|
return zero;
|
|
25332
|
-
var sign =
|
|
25332
|
+
var sign = value2 < 0;
|
|
25333
25333
|
if (sign)
|
|
25334
|
-
|
|
25335
|
-
var lo =
|
|
25334
|
+
value2 = -value2;
|
|
25335
|
+
var lo = value2 >>> 0, hi = (value2 - lo) / 4294967296 >>> 0;
|
|
25336
25336
|
if (sign) {
|
|
25337
25337
|
hi = ~hi >>> 0;
|
|
25338
25338
|
lo = ~lo >>> 0;
|
|
@@ -25344,16 +25344,16 @@ var require_longbits = __commonJS({
|
|
|
25344
25344
|
}
|
|
25345
25345
|
return new LongBits(lo, hi);
|
|
25346
25346
|
};
|
|
25347
|
-
LongBits.from = function from(
|
|
25348
|
-
if (typeof
|
|
25349
|
-
return LongBits.fromNumber(
|
|
25350
|
-
if (util.isString(
|
|
25347
|
+
LongBits.from = function from(value2) {
|
|
25348
|
+
if (typeof value2 === "number")
|
|
25349
|
+
return LongBits.fromNumber(value2);
|
|
25350
|
+
if (util.isString(value2)) {
|
|
25351
25351
|
if (util.Long)
|
|
25352
|
-
|
|
25352
|
+
value2 = util.Long.fromString(value2);
|
|
25353
25353
|
else
|
|
25354
|
-
return LongBits.fromNumber(parseInt(
|
|
25354
|
+
return LongBits.fromNumber(parseInt(value2, 10));
|
|
25355
25355
|
}
|
|
25356
|
-
return
|
|
25356
|
+
return value2.low || value2.high ? new LongBits(value2.low >>> 0, value2.high >>> 0) : zero;
|
|
25357
25357
|
};
|
|
25358
25358
|
LongBits.prototype.toNumber = function toNumber(unsigned) {
|
|
25359
25359
|
if (!unsigned && this.hi >>> 31) {
|
|
@@ -25775,49 +25775,49 @@ var require_umd = __commonJS({
|
|
|
25775
25775
|
function isLong(obj) {
|
|
25776
25776
|
return (obj && obj["__isLong__"]) === true;
|
|
25777
25777
|
}
|
|
25778
|
-
function ctz32(
|
|
25779
|
-
var c = Math.clz32(
|
|
25780
|
-
return
|
|
25778
|
+
function ctz32(value2) {
|
|
25779
|
+
var c = Math.clz32(value2 & -value2);
|
|
25780
|
+
return value2 ? 31 - c : c;
|
|
25781
25781
|
}
|
|
25782
25782
|
Long.isLong = isLong;
|
|
25783
25783
|
var INT_CACHE = {};
|
|
25784
25784
|
var UINT_CACHE = {};
|
|
25785
|
-
function fromInt(
|
|
25785
|
+
function fromInt(value2, unsigned) {
|
|
25786
25786
|
var obj, cachedObj, cache;
|
|
25787
25787
|
if (unsigned) {
|
|
25788
|
-
|
|
25789
|
-
if (cache = 0 <=
|
|
25790
|
-
cachedObj = UINT_CACHE[
|
|
25788
|
+
value2 >>>= 0;
|
|
25789
|
+
if (cache = 0 <= value2 && value2 < 256) {
|
|
25790
|
+
cachedObj = UINT_CACHE[value2];
|
|
25791
25791
|
if (cachedObj) return cachedObj;
|
|
25792
25792
|
}
|
|
25793
|
-
obj = fromBits(
|
|
25794
|
-
if (cache) UINT_CACHE[
|
|
25793
|
+
obj = fromBits(value2, 0, true);
|
|
25794
|
+
if (cache) UINT_CACHE[value2] = obj;
|
|
25795
25795
|
return obj;
|
|
25796
25796
|
} else {
|
|
25797
|
-
|
|
25798
|
-
if (cache = -128 <=
|
|
25799
|
-
cachedObj = INT_CACHE[
|
|
25797
|
+
value2 |= 0;
|
|
25798
|
+
if (cache = -128 <= value2 && value2 < 128) {
|
|
25799
|
+
cachedObj = INT_CACHE[value2];
|
|
25800
25800
|
if (cachedObj) return cachedObj;
|
|
25801
25801
|
}
|
|
25802
|
-
obj = fromBits(
|
|
25803
|
-
if (cache) INT_CACHE[
|
|
25802
|
+
obj = fromBits(value2, value2 < 0 ? -1 : 0, false);
|
|
25803
|
+
if (cache) INT_CACHE[value2] = obj;
|
|
25804
25804
|
return obj;
|
|
25805
25805
|
}
|
|
25806
25806
|
}
|
|
25807
25807
|
Long.fromInt = fromInt;
|
|
25808
|
-
function fromNumber(
|
|
25809
|
-
if (isNaN(
|
|
25808
|
+
function fromNumber(value2, unsigned) {
|
|
25809
|
+
if (isNaN(value2)) return unsigned ? UZERO : ZERO;
|
|
25810
25810
|
if (unsigned) {
|
|
25811
|
-
if (
|
|
25812
|
-
if (
|
|
25811
|
+
if (value2 < 0) return UZERO;
|
|
25812
|
+
if (value2 >= TWO_PWR_64_DBL) return MAX_UNSIGNED_VALUE;
|
|
25813
25813
|
} else {
|
|
25814
|
-
if (
|
|
25815
|
-
if (
|
|
25814
|
+
if (value2 <= -TWO_PWR_63_DBL) return MIN_VALUE;
|
|
25815
|
+
if (value2 + 1 >= TWO_PWR_63_DBL) return MAX_VALUE;
|
|
25816
25816
|
}
|
|
25817
|
-
if (
|
|
25817
|
+
if (value2 < 0) return fromNumber(-value2, unsigned).neg();
|
|
25818
25818
|
return fromBits(
|
|
25819
|
-
|
|
25820
|
-
|
|
25819
|
+
value2 % TWO_PWR_32_DBL | 0,
|
|
25820
|
+
value2 / TWO_PWR_32_DBL | 0,
|
|
25821
25821
|
unsigned
|
|
25822
25822
|
);
|
|
25823
25823
|
}
|
|
@@ -25847,13 +25847,13 @@ var require_umd = __commonJS({
|
|
|
25847
25847
|
var radixToPower = fromNumber(pow_dbl(radix, 8));
|
|
25848
25848
|
var result = ZERO;
|
|
25849
25849
|
for (var i = 0; i < str2.length; i += 8) {
|
|
25850
|
-
var size = Math.min(8, str2.length - i),
|
|
25850
|
+
var size = Math.min(8, str2.length - i), value2 = parseInt(str2.substring(i, i + size), radix);
|
|
25851
25851
|
if (size < 8) {
|
|
25852
25852
|
var power = fromNumber(pow_dbl(radix, size));
|
|
25853
|
-
result = result.mul(power).add(fromNumber(
|
|
25853
|
+
result = result.mul(power).add(fromNumber(value2));
|
|
25854
25854
|
} else {
|
|
25855
25855
|
result = result.mul(radixToPower);
|
|
25856
|
-
result = result.add(fromNumber(
|
|
25856
|
+
result = result.add(fromNumber(value2));
|
|
25857
25857
|
}
|
|
25858
25858
|
}
|
|
25859
25859
|
result.unsigned = unsigned;
|
|
@@ -26364,14 +26364,14 @@ var require_umd = __commonJS({
|
|
|
26364
26364
|
);
|
|
26365
26365
|
};
|
|
26366
26366
|
if (typeof BigInt === "function") {
|
|
26367
|
-
Long.fromBigInt = function fromBigInt(
|
|
26368
|
-
var lowBits = Number(BigInt.asIntN(32,
|
|
26369
|
-
var highBits = Number(BigInt.asIntN(32,
|
|
26367
|
+
Long.fromBigInt = function fromBigInt(value2, unsigned) {
|
|
26368
|
+
var lowBits = Number(BigInt.asIntN(32, value2));
|
|
26369
|
+
var highBits = Number(BigInt.asIntN(32, value2 >> BigInt(32)));
|
|
26370
26370
|
return fromBits(lowBits, highBits, unsigned);
|
|
26371
26371
|
};
|
|
26372
|
-
Long.fromValue = function fromValueWithBigInt(
|
|
26373
|
-
if (typeof
|
|
26374
|
-
return fromValue(
|
|
26372
|
+
Long.fromValue = function fromValueWithBigInt(value2, unsigned) {
|
|
26373
|
+
if (typeof value2 === "bigint") return Long.fromBigInt(value2, unsigned);
|
|
26374
|
+
return fromValue(value2, unsigned);
|
|
26375
26375
|
};
|
|
26376
26376
|
LongPrototype.toBigInt = function toBigInt() {
|
|
26377
26377
|
var lowBigInt = BigInt(this.low >>> 0);
|
|
@@ -26412,14 +26412,14 @@ var require_minimal = __commonJS({
|
|
|
26412
26412
|
{}
|
|
26413
26413
|
);
|
|
26414
26414
|
util.isInteger = Number.isInteger || /* istanbul ignore next */
|
|
26415
|
-
function isInteger(
|
|
26416
|
-
return typeof
|
|
26415
|
+
function isInteger(value2) {
|
|
26416
|
+
return typeof value2 === "number" && isFinite(value2) && Math.floor(value2) === value2;
|
|
26417
26417
|
};
|
|
26418
|
-
util.isString = function isString(
|
|
26419
|
-
return typeof
|
|
26418
|
+
util.isString = function isString(value2) {
|
|
26419
|
+
return typeof value2 === "string" || value2 instanceof String;
|
|
26420
26420
|
};
|
|
26421
|
-
util.isObject = function isObject(
|
|
26422
|
-
return
|
|
26421
|
+
util.isObject = function isObject(value2) {
|
|
26422
|
+
return value2 && typeof value2 === "object";
|
|
26423
26423
|
};
|
|
26424
26424
|
util.isset = /**
|
|
26425
26425
|
* Checks if a property on a message is considered to be present.
|
|
@@ -26428,9 +26428,9 @@ var require_minimal = __commonJS({
|
|
|
26428
26428
|
* @returns {boolean} `true` if considered to be present, otherwise `false`
|
|
26429
26429
|
*/
|
|
26430
26430
|
util.isSet = function isSet(obj, prop) {
|
|
26431
|
-
var
|
|
26432
|
-
if (
|
|
26433
|
-
return typeof
|
|
26431
|
+
var value2 = obj[prop];
|
|
26432
|
+
if (value2 != null && Object.hasOwnProperty.call(obj, prop))
|
|
26433
|
+
return typeof value2 !== "object" || (Array.isArray(value2) ? value2.length : Object.keys(value2).length) > 0;
|
|
26434
26434
|
return false;
|
|
26435
26435
|
};
|
|
26436
26436
|
util.Buffer = (function() {
|
|
@@ -26464,8 +26464,8 @@ var require_minimal = __commonJS({
|
|
|
26464
26464
|
util.key2Re = /^true|false|0|1$/;
|
|
26465
26465
|
util.key32Re = /^-?(?:0|[1-9][0-9]*)$/;
|
|
26466
26466
|
util.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;
|
|
26467
|
-
util.longToHash = function longToHash(
|
|
26468
|
-
return
|
|
26467
|
+
util.longToHash = function longToHash(value2) {
|
|
26468
|
+
return value2 ? util.LongBits.from(value2).toHash() : util.LongBits.zeroHash;
|
|
26469
26469
|
};
|
|
26470
26470
|
util.longFromHash = function longFromHash(hash, unsigned) {
|
|
26471
26471
|
var bits = util.LongBits.fromHash(hash);
|
|
@@ -26533,7 +26533,7 @@ var require_minimal = __commonJS({
|
|
|
26533
26533
|
configurable: true
|
|
26534
26534
|
},
|
|
26535
26535
|
toString: {
|
|
26536
|
-
value: function
|
|
26536
|
+
value: function value2() {
|
|
26537
26537
|
return this.name + ": " + this.message;
|
|
26538
26538
|
},
|
|
26539
26539
|
writable: true,
|
|
@@ -26575,8 +26575,8 @@ var require_minimal = __commonJS({
|
|
|
26575
26575
|
return;
|
|
26576
26576
|
}
|
|
26577
26577
|
util._Buffer_from = Buffer2.from !== Uint8Array.from && Buffer2.from || /* istanbul ignore next */
|
|
26578
|
-
function Buffer_from(
|
|
26579
|
-
return new Buffer2(
|
|
26578
|
+
function Buffer_from(value2, encoding) {
|
|
26579
|
+
return new Buffer2(value2, encoding);
|
|
26580
26580
|
};
|
|
26581
26581
|
util._Buffer_allocUnsafe = Buffer2.allocUnsafe || /* istanbul ignore next */
|
|
26582
26582
|
function Buffer_allocUnsafe(size) {
|
|
@@ -26653,18 +26653,18 @@ var require_writer = __commonJS({
|
|
|
26653
26653
|
}
|
|
26654
26654
|
VarintOp.prototype = Object.create(Op.prototype);
|
|
26655
26655
|
VarintOp.prototype.fn = writeVarint32;
|
|
26656
|
-
Writer.prototype.uint32 = function write_uint32(
|
|
26656
|
+
Writer.prototype.uint32 = function write_uint32(value2) {
|
|
26657
26657
|
this.len += (this.tail = this.tail.next = new VarintOp(
|
|
26658
|
-
(
|
|
26659
|
-
|
|
26658
|
+
(value2 = value2 >>> 0) < 128 ? 1 : value2 < 16384 ? 2 : value2 < 2097152 ? 3 : value2 < 268435456 ? 4 : 5,
|
|
26659
|
+
value2
|
|
26660
26660
|
)).len;
|
|
26661
26661
|
return this;
|
|
26662
26662
|
};
|
|
26663
|
-
Writer.prototype.int32 = function write_int32(
|
|
26664
|
-
return (
|
|
26663
|
+
Writer.prototype.int32 = function write_int32(value2) {
|
|
26664
|
+
return (value2 |= 0) < 0 ? this._push(writeVarint64, 10, LongBits.fromNumber(value2)) : this.uint32(value2);
|
|
26665
26665
|
};
|
|
26666
|
-
Writer.prototype.sint32 = function write_sint32(
|
|
26667
|
-
return this.uint32((
|
|
26666
|
+
Writer.prototype.sint32 = function write_sint32(value2) {
|
|
26667
|
+
return this.uint32((value2 << 1 ^ value2 >> 31) >>> 0);
|
|
26668
26668
|
};
|
|
26669
26669
|
function writeVarint64(val, buf, pos) {
|
|
26670
26670
|
var lo = val.lo, hi = val.hi;
|
|
@@ -26679,17 +26679,17 @@ var require_writer = __commonJS({
|
|
|
26679
26679
|
}
|
|
26680
26680
|
buf[pos++] = lo;
|
|
26681
26681
|
}
|
|
26682
|
-
Writer.prototype.uint64 = function write_uint64(
|
|
26683
|
-
var bits = LongBits.from(
|
|
26682
|
+
Writer.prototype.uint64 = function write_uint64(value2) {
|
|
26683
|
+
var bits = LongBits.from(value2);
|
|
26684
26684
|
return this._push(writeVarint64, bits.length(), bits);
|
|
26685
26685
|
};
|
|
26686
26686
|
Writer.prototype.int64 = Writer.prototype.uint64;
|
|
26687
|
-
Writer.prototype.sint64 = function write_sint64(
|
|
26688
|
-
var bits = LongBits.from(
|
|
26687
|
+
Writer.prototype.sint64 = function write_sint64(value2) {
|
|
26688
|
+
var bits = LongBits.from(value2).zzEncode();
|
|
26689
26689
|
return this._push(writeVarint64, bits.length(), bits);
|
|
26690
26690
|
};
|
|
26691
|
-
Writer.prototype.bool = function write_bool(
|
|
26692
|
-
return this._push(writeByte, 1,
|
|
26691
|
+
Writer.prototype.bool = function write_bool(value2) {
|
|
26692
|
+
return this._push(writeByte, 1, value2 ? 1 : 0);
|
|
26693
26693
|
};
|
|
26694
26694
|
function writeFixed32(val, buf, pos) {
|
|
26695
26695
|
buf[pos] = val & 255;
|
|
@@ -26697,20 +26697,20 @@ var require_writer = __commonJS({
|
|
|
26697
26697
|
buf[pos + 2] = val >>> 16 & 255;
|
|
26698
26698
|
buf[pos + 3] = val >>> 24;
|
|
26699
26699
|
}
|
|
26700
|
-
Writer.prototype.fixed32 = function write_fixed32(
|
|
26701
|
-
return this._push(writeFixed32, 4,
|
|
26700
|
+
Writer.prototype.fixed32 = function write_fixed32(value2) {
|
|
26701
|
+
return this._push(writeFixed32, 4, value2 >>> 0);
|
|
26702
26702
|
};
|
|
26703
26703
|
Writer.prototype.sfixed32 = Writer.prototype.fixed32;
|
|
26704
|
-
Writer.prototype.fixed64 = function write_fixed64(
|
|
26705
|
-
var bits = LongBits.from(
|
|
26704
|
+
Writer.prototype.fixed64 = function write_fixed64(value2) {
|
|
26705
|
+
var bits = LongBits.from(value2);
|
|
26706
26706
|
return this._push(writeFixed32, 4, bits.lo)._push(writeFixed32, 4, bits.hi);
|
|
26707
26707
|
};
|
|
26708
26708
|
Writer.prototype.sfixed64 = Writer.prototype.fixed64;
|
|
26709
|
-
Writer.prototype.float = function write_float(
|
|
26710
|
-
return this._push(util.float.writeFloatLE, 4,
|
|
26709
|
+
Writer.prototype.float = function write_float(value2) {
|
|
26710
|
+
return this._push(util.float.writeFloatLE, 4, value2);
|
|
26711
26711
|
};
|
|
26712
|
-
Writer.prototype.double = function write_double(
|
|
26713
|
-
return this._push(util.float.writeDoubleLE, 8,
|
|
26712
|
+
Writer.prototype.double = function write_double(value2) {
|
|
26713
|
+
return this._push(util.float.writeDoubleLE, 8, value2);
|
|
26714
26714
|
};
|
|
26715
26715
|
var writeBytes = util.Array.prototype.set ? function writeBytes_set(val, buf, pos) {
|
|
26716
26716
|
buf.set(val, pos);
|
|
@@ -26718,20 +26718,20 @@ var require_writer = __commonJS({
|
|
|
26718
26718
|
for (var i = 0; i < val.length; ++i)
|
|
26719
26719
|
buf[pos + i] = val[i];
|
|
26720
26720
|
};
|
|
26721
|
-
Writer.prototype.bytes = function write_bytes(
|
|
26722
|
-
var len =
|
|
26721
|
+
Writer.prototype.bytes = function write_bytes(value2) {
|
|
26722
|
+
var len = value2.length >>> 0;
|
|
26723
26723
|
if (!len)
|
|
26724
26724
|
return this._push(writeByte, 1, 0);
|
|
26725
|
-
if (util.isString(
|
|
26726
|
-
var buf = Writer.alloc(len = base64.length(
|
|
26727
|
-
base64.decode(
|
|
26728
|
-
|
|
26725
|
+
if (util.isString(value2)) {
|
|
26726
|
+
var buf = Writer.alloc(len = base64.length(value2));
|
|
26727
|
+
base64.decode(value2, buf, 0);
|
|
26728
|
+
value2 = buf;
|
|
26729
26729
|
}
|
|
26730
|
-
return this.uint32(len)._push(writeBytes, len,
|
|
26730
|
+
return this.uint32(len)._push(writeBytes, len, value2);
|
|
26731
26731
|
};
|
|
26732
|
-
Writer.prototype.string = function write_string(
|
|
26733
|
-
var len = utf83.length(
|
|
26734
|
-
return len ? this.uint32(len)._push(utf83.write, len,
|
|
26732
|
+
Writer.prototype.string = function write_string(value2) {
|
|
26733
|
+
var len = utf83.length(value2);
|
|
26734
|
+
return len ? this.uint32(len)._push(utf83.write, len, value2) : this._push(writeByte, 1, 0);
|
|
26735
26735
|
};
|
|
26736
26736
|
Writer.prototype.fork = function fork() {
|
|
26737
26737
|
this.states = new State(this);
|
|
@@ -26800,13 +26800,13 @@ var require_writer_buffer = __commonJS({
|
|
|
26800
26800
|
buf[pos++] = val[i++];
|
|
26801
26801
|
};
|
|
26802
26802
|
};
|
|
26803
|
-
BufferWriter.prototype.bytes = function write_bytes_buffer(
|
|
26804
|
-
if (util.isString(
|
|
26805
|
-
|
|
26806
|
-
var len =
|
|
26803
|
+
BufferWriter.prototype.bytes = function write_bytes_buffer(value2) {
|
|
26804
|
+
if (util.isString(value2))
|
|
26805
|
+
value2 = util._Buffer_from(value2, "base64");
|
|
26806
|
+
var len = value2.length >>> 0;
|
|
26807
26807
|
this.uint32(len);
|
|
26808
26808
|
if (len)
|
|
26809
|
-
this._push(BufferWriter.writeBytesBuffer, len,
|
|
26809
|
+
this._push(BufferWriter.writeBytesBuffer, len, value2);
|
|
26810
26810
|
return this;
|
|
26811
26811
|
};
|
|
26812
26812
|
function writeStringBuffer(val, buf, pos) {
|
|
@@ -26817,11 +26817,11 @@ var require_writer_buffer = __commonJS({
|
|
|
26817
26817
|
else
|
|
26818
26818
|
buf.write(val, pos);
|
|
26819
26819
|
}
|
|
26820
|
-
BufferWriter.prototype.string = function write_string_buffer(
|
|
26821
|
-
var len = util.Buffer.byteLength(
|
|
26820
|
+
BufferWriter.prototype.string = function write_string_buffer(value2) {
|
|
26821
|
+
var len = util.Buffer.byteLength(value2);
|
|
26822
26822
|
this.uint32(len);
|
|
26823
26823
|
if (len)
|
|
26824
|
-
this._push(writeStringBuffer, len,
|
|
26824
|
+
this._push(writeStringBuffer, len, value2);
|
|
26825
26825
|
return this;
|
|
26826
26826
|
};
|
|
26827
26827
|
BufferWriter._configure();
|
|
@@ -26865,19 +26865,19 @@ var require_reader = __commonJS({
|
|
|
26865
26865
|
Reader.prototype._slice = util.Array.prototype.subarray || /* istanbul ignore next */
|
|
26866
26866
|
util.Array.prototype.slice;
|
|
26867
26867
|
function readVarint32NearEnd(reader) {
|
|
26868
|
-
var
|
|
26868
|
+
var value2 = 0;
|
|
26869
26869
|
for (var i = 0; i < 4; ++i) {
|
|
26870
26870
|
if (reader.pos >= reader.len)
|
|
26871
26871
|
throw indexOutOfRange(reader);
|
|
26872
26872
|
var b = reader.buf[reader.pos++];
|
|
26873
|
-
|
|
26873
|
+
value2 = (value2 | (b & 127) << i * 7) >>> 0;
|
|
26874
26874
|
if (b < 128)
|
|
26875
|
-
return
|
|
26875
|
+
return value2;
|
|
26876
26876
|
}
|
|
26877
26877
|
throw indexOutOfRange(reader);
|
|
26878
26878
|
}
|
|
26879
26879
|
Reader.prototype.uint32 = /* @__PURE__ */ (function read_uint32_setup() {
|
|
26880
|
-
var
|
|
26880
|
+
var value2 = 4294967295;
|
|
26881
26881
|
return function read_uint32() {
|
|
26882
26882
|
if (this.len - this.pos < 5) {
|
|
26883
26883
|
if (this.pos >= this.len)
|
|
@@ -26885,29 +26885,29 @@ var require_reader = __commonJS({
|
|
|
26885
26885
|
if (this.buf[this.pos] >= 128)
|
|
26886
26886
|
return readVarint32NearEnd(this);
|
|
26887
26887
|
}
|
|
26888
|
-
|
|
26889
|
-
if (this.buf[this.pos++] < 128) return
|
|
26890
|
-
|
|
26891
|
-
if (this.buf[this.pos++] < 128) return
|
|
26892
|
-
|
|
26893
|
-
if (this.buf[this.pos++] < 128) return
|
|
26894
|
-
|
|
26895
|
-
if (this.buf[this.pos++] < 128) return
|
|
26896
|
-
|
|
26897
|
-
if (this.buf[this.pos++] < 128) return
|
|
26888
|
+
value2 = (this.buf[this.pos] & 127) >>> 0;
|
|
26889
|
+
if (this.buf[this.pos++] < 128) return value2;
|
|
26890
|
+
value2 = (value2 | (this.buf[this.pos] & 127) << 7) >>> 0;
|
|
26891
|
+
if (this.buf[this.pos++] < 128) return value2;
|
|
26892
|
+
value2 = (value2 | (this.buf[this.pos] & 127) << 14) >>> 0;
|
|
26893
|
+
if (this.buf[this.pos++] < 128) return value2;
|
|
26894
|
+
value2 = (value2 | (this.buf[this.pos] & 127) << 21) >>> 0;
|
|
26895
|
+
if (this.buf[this.pos++] < 128) return value2;
|
|
26896
|
+
value2 = (value2 | (this.buf[this.pos] & 15) << 28) >>> 0;
|
|
26897
|
+
if (this.buf[this.pos++] < 128) return value2;
|
|
26898
26898
|
if ((this.pos += 5) > this.len) {
|
|
26899
26899
|
this.pos = this.len;
|
|
26900
26900
|
throw indexOutOfRange(this, 10);
|
|
26901
26901
|
}
|
|
26902
|
-
return
|
|
26902
|
+
return value2;
|
|
26903
26903
|
};
|
|
26904
26904
|
})();
|
|
26905
26905
|
Reader.prototype.int32 = function read_int32() {
|
|
26906
26906
|
return this.uint32() | 0;
|
|
26907
26907
|
};
|
|
26908
26908
|
Reader.prototype.sint32 = function read_sint32() {
|
|
26909
|
-
var
|
|
26910
|
-
return
|
|
26909
|
+
var value2 = this.uint32();
|
|
26910
|
+
return value2 >>> 1 ^ -(value2 & 1) | 0;
|
|
26911
26911
|
};
|
|
26912
26912
|
function readLongVarint() {
|
|
26913
26913
|
var bits = new LongBits(0, 0);
|
|
@@ -26975,16 +26975,16 @@ var require_reader = __commonJS({
|
|
|
26975
26975
|
Reader.prototype.float = function read_float() {
|
|
26976
26976
|
if (this.pos + 4 > this.len)
|
|
26977
26977
|
throw indexOutOfRange(this, 4);
|
|
26978
|
-
var
|
|
26978
|
+
var value2 = util.float.readFloatLE(this.buf, this.pos);
|
|
26979
26979
|
this.pos += 4;
|
|
26980
|
-
return
|
|
26980
|
+
return value2;
|
|
26981
26981
|
};
|
|
26982
26982
|
Reader.prototype.double = function read_double() {
|
|
26983
26983
|
if (this.pos + 8 > this.len)
|
|
26984
26984
|
throw indexOutOfRange(this, 4);
|
|
26985
|
-
var
|
|
26985
|
+
var value2 = util.float.readDoubleLE(this.buf, this.pos);
|
|
26986
26986
|
this.pos += 8;
|
|
26987
|
-
return
|
|
26987
|
+
return value2;
|
|
26988
26988
|
};
|
|
26989
26989
|
Reader.prototype.bytes = function read_bytes() {
|
|
26990
26990
|
var length = this.uint32(), start = this.pos, end = this.pos + length;
|
|
@@ -27266,22 +27266,22 @@ var require_lib2 = __commonJS({
|
|
|
27266
27266
|
return t;
|
|
27267
27267
|
}
|
|
27268
27268
|
function __awaiter(thisArg, _arguments, P2, generator) {
|
|
27269
|
-
function adopt(
|
|
27270
|
-
return
|
|
27271
|
-
resolve(
|
|
27269
|
+
function adopt(value2) {
|
|
27270
|
+
return value2 instanceof P2 ? value2 : new P2(function(resolve) {
|
|
27271
|
+
resolve(value2);
|
|
27272
27272
|
});
|
|
27273
27273
|
}
|
|
27274
27274
|
return new (P2 || (P2 = Promise))(function(resolve, reject) {
|
|
27275
|
-
function fulfilled(
|
|
27275
|
+
function fulfilled(value2) {
|
|
27276
27276
|
try {
|
|
27277
|
-
step(generator.next(
|
|
27277
|
+
step(generator.next(value2));
|
|
27278
27278
|
} catch (e) {
|
|
27279
27279
|
reject(e);
|
|
27280
27280
|
}
|
|
27281
27281
|
}
|
|
27282
|
-
function rejected(
|
|
27282
|
+
function rejected(value2) {
|
|
27283
27283
|
try {
|
|
27284
|
-
step(generator["throw"](
|
|
27284
|
+
step(generator["throw"](value2));
|
|
27285
27285
|
} catch (e) {
|
|
27286
27286
|
reject(e);
|
|
27287
27287
|
}
|
|
@@ -27329,11 +27329,11 @@ var require_lib2 = __commonJS({
|
|
|
27329
27329
|
function step(r) {
|
|
27330
27330
|
r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);
|
|
27331
27331
|
}
|
|
27332
|
-
function fulfill(
|
|
27333
|
-
resume("next",
|
|
27332
|
+
function fulfill(value2) {
|
|
27333
|
+
resume("next", value2);
|
|
27334
27334
|
}
|
|
27335
|
-
function reject(
|
|
27336
|
-
resume("throw",
|
|
27335
|
+
function reject(value2) {
|
|
27336
|
+
resume("throw", value2);
|
|
27337
27337
|
}
|
|
27338
27338
|
function settle(f, v) {
|
|
27339
27339
|
if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);
|
|
@@ -27459,19 +27459,19 @@ var require_lib2 = __commonJS({
|
|
|
27459
27459
|
const cacheKey = this.getCacheKey(key, options === null || options === void 0 ? void 0 : options.namespace);
|
|
27460
27460
|
const data = this.values.get(cacheKey);
|
|
27461
27461
|
if (data) {
|
|
27462
|
-
const { value, expiredTime } = data;
|
|
27462
|
+
const { value: value2, expiredTime } = data;
|
|
27463
27463
|
if (!expiredTime || expiredTime - (/* @__PURE__ */ new Date()).getTime() > 0) {
|
|
27464
|
-
return
|
|
27464
|
+
return value2;
|
|
27465
27465
|
}
|
|
27466
27466
|
}
|
|
27467
27467
|
return void 0;
|
|
27468
27468
|
});
|
|
27469
27469
|
}
|
|
27470
|
-
set(key,
|
|
27470
|
+
set(key, value2, expiredTime, options) {
|
|
27471
27471
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27472
27472
|
const cacheKey = this.getCacheKey(key, options === null || options === void 0 ? void 0 : options.namespace);
|
|
27473
27473
|
this.values.set(cacheKey, {
|
|
27474
|
-
value,
|
|
27474
|
+
value: value2,
|
|
27475
27475
|
expiredTime
|
|
27476
27476
|
});
|
|
27477
27477
|
return true;
|
|
@@ -120548,9 +120548,9 @@ var require_lib2 = __commonJS({
|
|
|
120548
120548
|
};
|
|
120549
120549
|
var mergeObject = (obj1, obj2) => {
|
|
120550
120550
|
const mergedObject = Object.assign({}, obj1);
|
|
120551
|
-
for (let [key,
|
|
120552
|
-
if (
|
|
120553
|
-
mergedObject[key] =
|
|
120551
|
+
for (let [key, value2] of Object.entries(obj2)) {
|
|
120552
|
+
if (value2 !== void 0) {
|
|
120553
|
+
mergedObject[key] = value2;
|
|
120554
120554
|
}
|
|
120555
120555
|
}
|
|
120556
120556
|
return mergedObject;
|
|
@@ -120663,7 +120663,7 @@ var require_lib2 = __commonJS({
|
|
|
120663
120663
|
});
|
|
120664
120664
|
}
|
|
120665
120665
|
};
|
|
120666
|
-
var valueIfNotEmpty = (
|
|
120666
|
+
var valueIfNotEmpty = (value2) => value2 === "" || value2 === 0 || value2 === null || value2 === void 0 ? void 0 : value2;
|
|
120667
120667
|
var isErrorResponse = (resp) => {
|
|
120668
120668
|
if (!resp) {
|
|
120669
120669
|
return true;
|
|
@@ -121147,8 +121147,8 @@ var require_lib2 = __commonJS({
|
|
|
121147
121147
|
return;
|
|
121148
121148
|
}
|
|
121149
121149
|
}
|
|
121150
|
-
const
|
|
121151
|
-
res.end(JSON.stringify(
|
|
121150
|
+
const value2 = yield dispatcher.invoke(data);
|
|
121151
|
+
res.end(JSON.stringify(value2));
|
|
121152
121152
|
});
|
|
121153
121153
|
var adaptExpress = (dispatcher, options) => (req, res) => __awaiter(void 0, void 0, void 0, function* () {
|
|
121154
121154
|
const reqData = yield (() => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -121175,8 +121175,8 @@ var require_lib2 = __commonJS({
|
|
|
121175
121175
|
return;
|
|
121176
121176
|
}
|
|
121177
121177
|
}
|
|
121178
|
-
const
|
|
121179
|
-
res.json(
|
|
121178
|
+
const value2 = yield dispatcher.invoke(data);
|
|
121179
|
+
res.json(value2);
|
|
121180
121180
|
});
|
|
121181
121181
|
var adaptKoa = (path2, dispatcher, options) => (ctx, next) => __awaiter(void 0, void 0, void 0, function* () {
|
|
121182
121182
|
const { originalUrl, req, request } = ctx;
|
|
@@ -121206,8 +121206,8 @@ var require_lib2 = __commonJS({
|
|
|
121206
121206
|
return;
|
|
121207
121207
|
}
|
|
121208
121208
|
}
|
|
121209
|
-
const
|
|
121210
|
-
ctx.body = JSON.stringify(
|
|
121209
|
+
const value2 = yield dispatcher.invoke(data);
|
|
121210
|
+
ctx.body = JSON.stringify(value2);
|
|
121211
121211
|
}
|
|
121212
121212
|
yield next();
|
|
121213
121213
|
});
|
|
@@ -121238,8 +121238,8 @@ var require_lib2 = __commonJS({
|
|
|
121238
121238
|
return;
|
|
121239
121239
|
}
|
|
121240
121240
|
}
|
|
121241
|
-
const
|
|
121242
|
-
ctx.body = JSON.stringify(
|
|
121241
|
+
const value2 = yield dispatcher.invoke(data);
|
|
121242
|
+
ctx.body = JSON.stringify(value2);
|
|
121243
121243
|
yield next();
|
|
121244
121244
|
});
|
|
121245
121245
|
var defaultCard = (variables) => {
|
|
@@ -121776,9 +121776,9 @@ var require_lib2 = __commonJS({
|
|
|
121776
121776
|
const clearIntervalMs = 1e4;
|
|
121777
121777
|
this.timer = setInterval(() => {
|
|
121778
121778
|
const now = Date.now();
|
|
121779
|
-
this.cache.forEach((
|
|
121779
|
+
this.cache.forEach((value2, key) => {
|
|
121780
121780
|
var _a;
|
|
121781
|
-
const { create_time, trace_id, message_id } =
|
|
121781
|
+
const { create_time, trace_id, message_id } = value2;
|
|
121782
121782
|
if (now - create_time > clearIntervalMs) {
|
|
121783
121783
|
(_a = this.logger) === null || _a === void 0 ? void 0 : _a.debug(`${message_id} event data is deleted as expired, trace_id: ${trace_id}`);
|
|
121784
121784
|
this.deleteCache(key);
|
|
@@ -122361,10 +122361,10 @@ var require_lib2 = __commonJS({
|
|
|
122361
122361
|
constructor() {
|
|
122362
122362
|
this.sessions = /* @__PURE__ */ new Map();
|
|
122363
122363
|
}
|
|
122364
|
-
set(key,
|
|
122364
|
+
set(key, value2) {
|
|
122365
122365
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122366
122366
|
const sessions = this.sessions.get(key.toString()) || {};
|
|
122367
|
-
const mergedSessions = mergeObject(sessions,
|
|
122367
|
+
const mergedSessions = mergeObject(sessions, value2);
|
|
122368
122368
|
this.sessions.set(key.toString(), mergedSessions);
|
|
122369
122369
|
return true;
|
|
122370
122370
|
});
|
|
@@ -122617,8 +122617,8 @@ var require_lib2 = __commonJS({
|
|
|
122617
122617
|
});
|
|
122618
122618
|
}
|
|
122619
122619
|
};
|
|
122620
|
-
function assertPlainObject(
|
|
122621
|
-
if (typeof
|
|
122620
|
+
function assertPlainObject(value2, path2) {
|
|
122621
|
+
if (typeof value2 !== "object" || value2 === null || Array.isArray(value2)) {
|
|
122622
122622
|
throw new Error(`${path2} must be an object`);
|
|
122623
122623
|
}
|
|
122624
122624
|
}
|
|
@@ -122629,27 +122629,27 @@ var require_lib2 = __commonJS({
|
|
|
122629
122629
|
}
|
|
122630
122630
|
}
|
|
122631
122631
|
}
|
|
122632
|
-
function validateStringArray(
|
|
122633
|
-
if (
|
|
122632
|
+
function validateStringArray(value2, path2) {
|
|
122633
|
+
if (value2 === void 0) {
|
|
122634
122634
|
return void 0;
|
|
122635
122635
|
}
|
|
122636
|
-
if (!Array.isArray(
|
|
122636
|
+
if (!Array.isArray(value2)) {
|
|
122637
122637
|
throw new Error(`${path2} must be an array of strings`);
|
|
122638
122638
|
}
|
|
122639
|
-
|
|
122639
|
+
value2.forEach((item, idx) => {
|
|
122640
122640
|
if (typeof item !== "string" || item === "") {
|
|
122641
122641
|
throw new Error(`${path2}[${idx}] must be a non-empty string`);
|
|
122642
122642
|
}
|
|
122643
122643
|
});
|
|
122644
|
-
return
|
|
122644
|
+
return value2;
|
|
122645
122645
|
}
|
|
122646
122646
|
function normalizeAddons(addons) {
|
|
122647
122647
|
assertPlainObject(addons, "addons");
|
|
122648
122648
|
assertAllowedKeys(addons, ["preset", "scopes", "events", "callbacks"], "addons");
|
|
122649
122649
|
let itemCount = 0;
|
|
122650
|
-
const pick2 = (
|
|
122650
|
+
const pick2 = (value2, path2) => {
|
|
122651
122651
|
var _a;
|
|
122652
|
-
const items = validateStringArray(
|
|
122652
|
+
const items = validateStringArray(value2, path2);
|
|
122653
122653
|
itemCount += (_a = items === null || items === void 0 ? void 0 : items.length) !== null && _a !== void 0 ? _a : 0;
|
|
122654
122654
|
return items;
|
|
122655
122655
|
};
|
|
@@ -126211,7 +126211,7 @@ var hasAttached = (state, chatKey, threadId) => state.attached?.[attachedKey(cha
|
|
|
126211
126211
|
var attachedOnChat = (state, chatKey, projectId) => Object.values(state.attached ?? {}).filter(
|
|
126212
126212
|
(record2) => record2.chatKey === chatKey && record2.projectId === projectId
|
|
126213
126213
|
);
|
|
126214
|
-
var nonEmpty = (
|
|
126214
|
+
var nonEmpty = (value2) => typeof value2 === "string" && value2 !== "" ? value2 : null;
|
|
126215
126215
|
var readAttached = (data) => {
|
|
126216
126216
|
const chatKey = nonEmpty(data["chatKey"]);
|
|
126217
126217
|
const threadId = nonEmpty(data["threadId"]);
|
|
@@ -126288,18 +126288,18 @@ var findQueueByToken = (state, token) => {
|
|
|
126288
126288
|
var openQueueOfThread = (state, threadId) => Object.values(queueOf(state)).filter(
|
|
126289
126289
|
(record2) => record2.threadId === threadId && record2.settled === void 0
|
|
126290
126290
|
);
|
|
126291
|
-
var isRecord = (
|
|
126292
|
-
var nonEmpty2 = (
|
|
126293
|
-
var readTarget = (
|
|
126294
|
-
if (!isRecord(
|
|
126295
|
-
if (
|
|
126296
|
-
const teamId = nonEmpty2(
|
|
126297
|
-
return
|
|
126291
|
+
var isRecord = (value2) => typeof value2 === "object" && value2 !== null && !Array.isArray(value2);
|
|
126292
|
+
var nonEmpty2 = (value2) => typeof value2 === "string" && value2 !== "" ? value2 : null;
|
|
126293
|
+
var readTarget = (value2) => {
|
|
126294
|
+
if (!isRecord(value2)) return null;
|
|
126295
|
+
if (value2["kind"] === "thread") return { kind: "thread" };
|
|
126296
|
+
const teamId = nonEmpty2(value2["teamId"]);
|
|
126297
|
+
return value2["kind"] === "team" && teamId !== null ? { kind: "team", teamId } : null;
|
|
126298
126298
|
};
|
|
126299
|
-
var readButtons = (
|
|
126300
|
-
if (!Array.isArray(
|
|
126299
|
+
var readButtons = (value2) => {
|
|
126300
|
+
if (!Array.isArray(value2)) return null;
|
|
126301
126301
|
const buttons = [];
|
|
126302
|
-
for (const entry of
|
|
126302
|
+
for (const entry of value2) {
|
|
126303
126303
|
if (!isRecord(entry)) return null;
|
|
126304
126304
|
const token = nonEmpty2(entry["token"]);
|
|
126305
126305
|
const decision = nonEmpty2(entry["decision"]);
|
|
@@ -126309,10 +126309,10 @@ var readButtons = (value) => {
|
|
|
126309
126309
|
}
|
|
126310
126310
|
return buttons.length === 0 ? null : buttons;
|
|
126311
126311
|
};
|
|
126312
|
-
var readQuestionOptions = (
|
|
126313
|
-
if (!Array.isArray(
|
|
126312
|
+
var readQuestionOptions = (value2) => {
|
|
126313
|
+
if (!Array.isArray(value2)) return null;
|
|
126314
126314
|
const options = [];
|
|
126315
|
-
for (const entry of
|
|
126315
|
+
for (const entry of value2) {
|
|
126316
126316
|
if (!isRecord(entry)) return null;
|
|
126317
126317
|
const token = nonEmpty2(entry["token"]);
|
|
126318
126318
|
const optionValue = nonEmpty2(entry["value"]);
|
|
@@ -126328,10 +126328,10 @@ var readQuestionOptions = (value) => {
|
|
|
126328
126328
|
}
|
|
126329
126329
|
return options.length === 0 ? null : options;
|
|
126330
126330
|
};
|
|
126331
|
-
var readQuestionItems = (
|
|
126332
|
-
if (!Array.isArray(
|
|
126331
|
+
var readQuestionItems = (value2) => {
|
|
126332
|
+
if (!Array.isArray(value2)) return null;
|
|
126333
126333
|
const items = [];
|
|
126334
|
-
for (const entry of
|
|
126334
|
+
for (const entry of value2) {
|
|
126335
126335
|
if (!isRecord(entry)) return null;
|
|
126336
126336
|
const id = nonEmpty2(entry["id"]);
|
|
126337
126337
|
const options = readQuestionOptions(entry["options"]);
|
|
@@ -126352,10 +126352,10 @@ var readQuestionItems = (value) => {
|
|
|
126352
126352
|
}
|
|
126353
126353
|
return items.length === 0 ? null : items;
|
|
126354
126354
|
};
|
|
126355
|
-
var readAnswer = (
|
|
126356
|
-
if (typeof
|
|
126357
|
-
if (Array.isArray(
|
|
126358
|
-
return
|
|
126355
|
+
var readAnswer = (value2) => {
|
|
126356
|
+
if (typeof value2 === "string") return value2;
|
|
126357
|
+
if (Array.isArray(value2) && value2.every((v) => typeof v === "string")) {
|
|
126358
|
+
return value2;
|
|
126359
126359
|
}
|
|
126360
126360
|
return null;
|
|
126361
126361
|
};
|
|
@@ -126627,8 +126627,8 @@ var foldPluginEvent = (pluginId) => (state, event) => {
|
|
|
126627
126627
|
|
|
126628
126628
|
// src/configRead.ts
|
|
126629
126629
|
var readString = (row, key) => {
|
|
126630
|
-
const
|
|
126631
|
-
return typeof
|
|
126630
|
+
const value2 = row[key];
|
|
126631
|
+
return typeof value2 === "string" ? value2.trim() : "";
|
|
126632
126632
|
};
|
|
126633
126633
|
|
|
126634
126634
|
// src/targetKind.ts
|
|
@@ -126640,7 +126640,7 @@ var TARGET_KIND_OPTIONS = [
|
|
|
126640
126640
|
var TARGET_KINDS = new Set(
|
|
126641
126641
|
TARGET_KIND_OPTIONS.map((option) => option.value)
|
|
126642
126642
|
);
|
|
126643
|
-
var isTargetKind = (
|
|
126643
|
+
var isTargetKind = (value2) => TARGET_KINDS.has(value2);
|
|
126644
126644
|
|
|
126645
126645
|
// src/deliveryTargets.ts
|
|
126646
126646
|
var DELIVERY_TARGETS_FIELD = "deliveryTargets";
|
|
@@ -126649,7 +126649,7 @@ var DELIVERY_HTTP_PORT_FIELD = "deliveryHttpPort";
|
|
|
126649
126649
|
var DELIVERY_HTTP_TOKEN_FIELD = "deliveryHttpToken";
|
|
126650
126650
|
var DEFAULT_DELIVERY_HTTP_PORT = 3847;
|
|
126651
126651
|
var TARGET_ID_PATTERN = /^[A-Za-z0-9._:@-]{1,128}$/;
|
|
126652
|
-
var isValidTargetId = (
|
|
126652
|
+
var isValidTargetId = (value2) => TARGET_ID_PATTERN.test(value2);
|
|
126653
126653
|
var readDeliveryTargets = (config2) => {
|
|
126654
126654
|
const table2 = config2[DELIVERY_TARGETS_FIELD];
|
|
126655
126655
|
if (typeof table2 !== "object" || table2 === null) return [];
|
|
@@ -126683,8 +126683,8 @@ var readDeliveryHttpPort = (config2) => {
|
|
|
126683
126683
|
return n;
|
|
126684
126684
|
};
|
|
126685
126685
|
var readDeliveryHttpToken = (config2) => {
|
|
126686
|
-
const
|
|
126687
|
-
return typeof
|
|
126686
|
+
const value2 = config2[DELIVERY_HTTP_TOKEN_FIELD];
|
|
126687
|
+
return typeof value2 === "string" ? value2 : "";
|
|
126688
126688
|
};
|
|
126689
126689
|
var buildDeliverySettingsFields = () => [
|
|
126690
126690
|
{
|
|
@@ -126754,7 +126754,7 @@ var buildDeliverySettingsFields = () => [
|
|
|
126754
126754
|
var BOTS_FIELD = "bots";
|
|
126755
126755
|
var REPLY_LANGUAGE_FIELD = "replyLanguage";
|
|
126756
126756
|
var DEFAULT_PLATFORM = "lark";
|
|
126757
|
-
var parseGroupMention = (
|
|
126757
|
+
var parseGroupMention = (value2) => value2 === "never" || value2 === "ambient" ? value2 : "always";
|
|
126758
126758
|
var INBOUND_RUNTIME_MODES = /* @__PURE__ */ new Set([
|
|
126759
126759
|
"approval-required",
|
|
126760
126760
|
"auto-accept-edits",
|
|
@@ -126785,12 +126785,12 @@ var LARK_PANEL_MODES = new Set(
|
|
|
126785
126785
|
);
|
|
126786
126786
|
var DEFAULT_LARK_PANEL_MODE = "default";
|
|
126787
126787
|
var chatKeyOf = (binding) => `${binding.rowId}:${binding.chatId}`;
|
|
126788
|
-
var parseQueueMode = (
|
|
126789
|
-
var parseAccessMode = (
|
|
126790
|
-
var parseLarkPanelMode = (
|
|
126791
|
-
var parseOnOff = (
|
|
126792
|
-
if (
|
|
126793
|
-
if (
|
|
126788
|
+
var parseQueueMode = (value2) => QUEUE_MODES.has(value2) ? value2 : DEFAULT_QUEUE_MODE;
|
|
126789
|
+
var parseAccessMode = (value2) => ACCESS_MODES.has(value2) ? value2 : DEFAULT_ACCESS_MODE;
|
|
126790
|
+
var parseLarkPanelMode = (value2) => LARK_PANEL_MODES.has(value2) ? value2 : DEFAULT_LARK_PANEL_MODE;
|
|
126791
|
+
var parseOnOff = (value2, defaultOn) => {
|
|
126792
|
+
if (value2 === "on") return true;
|
|
126793
|
+
if (value2 === "off") return false;
|
|
126794
126794
|
return defaultOn;
|
|
126795
126795
|
};
|
|
126796
126796
|
var ROW_ACTION_COMMANDS = {
|
|
@@ -127104,7 +127104,8 @@ var makeApprovals = (core) => {
|
|
|
127104
127104
|
);
|
|
127105
127105
|
const offers = (adapter.answerByText === void 0 ? fresh : fresh.slice(0, 1)).map(
|
|
127106
127106
|
(approval) => {
|
|
127107
|
-
const
|
|
127107
|
+
const offered = approval.options.filter((option) => option.decision !== "acceptAlways");
|
|
127108
|
+
const options = offered.length > 0 ? offered : [
|
|
127108
127109
|
{ decision: "accept", label: t("approval.allow") },
|
|
127109
127110
|
{ decision: "decline", label: t("approval.deny") }
|
|
127110
127111
|
];
|
|
@@ -127864,14 +127865,14 @@ var readBodyLimited = async (response, maxBytes) => {
|
|
|
127864
127865
|
const chunks = [];
|
|
127865
127866
|
let total = 0;
|
|
127866
127867
|
for (; ; ) {
|
|
127867
|
-
const { done, value } = await reader.read();
|
|
127868
|
+
const { done, value: value2 } = await reader.read();
|
|
127868
127869
|
if (done) break;
|
|
127869
|
-
total +=
|
|
127870
|
+
total += value2.byteLength;
|
|
127870
127871
|
if (total > maxBytes) {
|
|
127871
127872
|
await reader.cancel().catch(() => void 0);
|
|
127872
127873
|
throw new ImResourceTooLargeError(maxBytes);
|
|
127873
127874
|
}
|
|
127874
|
-
chunks.push(
|
|
127875
|
+
chunks.push(value2);
|
|
127875
127876
|
}
|
|
127876
127877
|
const bytes = new Uint8Array(total);
|
|
127877
127878
|
let offset = 0;
|
|
@@ -128483,13 +128484,13 @@ var makeQuestionFlow = (host) => {
|
|
|
128483
128484
|
host.outbound(chatKey, () => post(request.requestId));
|
|
128484
128485
|
}
|
|
128485
128486
|
};
|
|
128486
|
-
const answer = async (requestId, questionId,
|
|
128487
|
+
const answer = async (requestId, questionId, value2, label) => {
|
|
128487
128488
|
const before = recordOf(requestId);
|
|
128488
128489
|
const item = itemOf(requestId, questionId);
|
|
128489
128490
|
if (before === void 0 || before.resolved || item === void 0 || !isUnanswered(item)) {
|
|
128490
128491
|
return false;
|
|
128491
128492
|
}
|
|
128492
|
-
host.commit("question-answered", { requestId, questionId, answer:
|
|
128493
|
+
host.commit("question-answered", { requestId, questionId, answer: value2, label });
|
|
128493
128494
|
const after = recordOf(requestId);
|
|
128494
128495
|
if (after === void 0) return false;
|
|
128495
128496
|
const complete = after.items.every((entry) => !isUnanswered(entry));
|
|
@@ -128527,7 +128528,7 @@ var makeQuestionFlow = (host) => {
|
|
|
128527
128528
|
void answer(requestId, item.id, option.value, optionLabelOf(item, option, t));
|
|
128528
128529
|
return handledWith(null);
|
|
128529
128530
|
}
|
|
128530
|
-
const selected = item.selected.includes(option.value) ? item.selected.filter((
|
|
128531
|
+
const selected = item.selected.includes(option.value) ? item.selected.filter((value2) => value2 !== option.value) : [...item.selected, option.value];
|
|
128531
128532
|
host.commit("question-selected", { requestId, questionId: item.id, selected });
|
|
128532
128533
|
host.outbound(record2.chatKey, () => redraw(requestId, item.id));
|
|
128533
128534
|
return handledWith(null);
|
|
@@ -129148,10 +129149,10 @@ var SETUP_ITEM_SCHEMA = makeFlowItemSchema({
|
|
|
129148
129149
|
// src/lark/setup/saveBot.ts
|
|
129149
129150
|
var OPEN_ID_PREFIX = "ou_";
|
|
129150
129151
|
var LARK_PLATFORM = "lark";
|
|
129151
|
-
var asRecord = (
|
|
129152
|
+
var asRecord = (value2) => typeof value2 === "object" && value2 !== null && !Array.isArray(value2) ? { ...value2 } : {};
|
|
129152
129153
|
var text = (row, key) => {
|
|
129153
|
-
const
|
|
129154
|
-
return typeof
|
|
129154
|
+
const value2 = row[key];
|
|
129155
|
+
return typeof value2 === "string" ? value2.trim() : "";
|
|
129155
129156
|
};
|
|
129156
129157
|
var freeRowId = (table2) => {
|
|
129157
129158
|
if (!(LARK_PLATFORM in table2)) return LARK_PLATFORM;
|
|
@@ -129193,12 +129194,12 @@ var upsertLarkBot = (current, result) => {
|
|
|
129193
129194
|
};
|
|
129194
129195
|
|
|
129195
129196
|
// src/lark/setup/consolePayloads.ts
|
|
129196
|
-
var asRecord2 = (
|
|
129197
|
+
var asRecord2 = (value2) => value2 !== null && typeof value2 === "object" && !Array.isArray(value2) ? value2 : {};
|
|
129197
129198
|
var pickString = (record2, keys) => {
|
|
129198
129199
|
for (const key of keys) {
|
|
129199
|
-
const
|
|
129200
|
-
if (typeof
|
|
129201
|
-
if (typeof
|
|
129200
|
+
const value2 = record2[key];
|
|
129201
|
+
if (typeof value2 === "string" && value2 !== "") return value2;
|
|
129202
|
+
if (typeof value2 === "number" && Number.isFinite(value2)) return String(value2);
|
|
129202
129203
|
}
|
|
129203
129204
|
return void 0;
|
|
129204
129205
|
};
|
|
@@ -129335,13 +129336,13 @@ var extractAppListPage = (payload) => {
|
|
|
129335
129336
|
const total = typeof data.totalCount === "number" ? data.totalCount : typeof record2.totalCount === "number" ? record2.totalCount : void 0;
|
|
129336
129337
|
return { apps, rawCount: raw.length, ...total === void 0 ? {} : { total } };
|
|
129337
129338
|
};
|
|
129338
|
-
var eventIds = (
|
|
129339
|
-
|
|
129339
|
+
var eventIds = (value2) => Array.isArray(value2) ? uniq(
|
|
129340
|
+
value2.flatMap((item) => {
|
|
129340
129341
|
const id = typeof item === "string" ? item : pickString(asRecord2(item), ["id"]);
|
|
129341
129342
|
return id === void 0 ? [] : [id];
|
|
129342
129343
|
})
|
|
129343
129344
|
) : [];
|
|
129344
|
-
var eventIdsFromDetails = (
|
|
129345
|
+
var eventIdsFromDetails = (value2) => Array.isArray(value2) ? uniq(value2.flatMap((group) => eventIds(asRecord2(group).items))) : [];
|
|
129345
129346
|
var unwrapData = (payload) => {
|
|
129346
129347
|
const root = asRecord2(payload);
|
|
129347
129348
|
const wrapped = asRecord2(root.data);
|
|
@@ -129372,13 +129373,13 @@ var extractCallbackState = (payload) => {
|
|
|
129372
129373
|
var SCOPE_NAME_KEYS = ["scope_name", "scopeName", "name", "key", "scopeKey"];
|
|
129373
129374
|
var SCOPE_ID_KEYS = ["id", "scope_id", "scopeId", "scopeID"];
|
|
129374
129375
|
var SCOPE_GRANTED_KEYS = ["granted", "isGranted", "hasScope", "isAdded"];
|
|
129375
|
-
var collectScopes = (
|
|
129376
|
-
if (Array.isArray(
|
|
129377
|
-
for (const item of
|
|
129376
|
+
var collectScopes = (value2, out) => {
|
|
129377
|
+
if (Array.isArray(value2)) {
|
|
129378
|
+
for (const item of value2) collectScopes(item, out);
|
|
129378
129379
|
return;
|
|
129379
129380
|
}
|
|
129380
|
-
if (
|
|
129381
|
-
const record2 =
|
|
129381
|
+
if (value2 === null || typeof value2 !== "object") return;
|
|
129382
|
+
const record2 = value2;
|
|
129382
129383
|
const name = pickString(record2, SCOPE_NAME_KEYS);
|
|
129383
129384
|
const id = pickString(record2, SCOPE_ID_KEYS);
|
|
129384
129385
|
if (name !== void 0 && id !== void 0) {
|
|
@@ -129451,8 +129452,8 @@ var extractVersionId = (payload) => {
|
|
|
129451
129452
|
const data = asRecord2(root.data);
|
|
129452
129453
|
return pickString(root, keys) ?? pickString(data, keys) ?? pickString(asRecord2(data.appVersion), keys);
|
|
129453
129454
|
};
|
|
129454
|
-
var visibilityOf = (
|
|
129455
|
-
const record2 = asRecord2(
|
|
129455
|
+
var visibilityOf = (value2) => {
|
|
129456
|
+
const record2 = asRecord2(value2);
|
|
129456
129457
|
const strings = (key) => Array.isArray(record2[key]) ? record2[key].filter((item) => typeof item === "string") : [];
|
|
129457
129458
|
return {
|
|
129458
129459
|
departments: strings("departments"),
|
|
@@ -129493,11 +129494,11 @@ var adler32 = (bytes) => {
|
|
|
129493
129494
|
}
|
|
129494
129495
|
return (b << 16 | a) >>> 0;
|
|
129495
129496
|
};
|
|
129496
|
-
var u32 = (
|
|
129497
|
-
|
|
129498
|
-
|
|
129499
|
-
|
|
129500
|
-
|
|
129497
|
+
var u32 = (value2) => [
|
|
129498
|
+
value2 >>> 24 & 255,
|
|
129499
|
+
value2 >>> 16 & 255,
|
|
129500
|
+
value2 >>> 8 & 255,
|
|
129501
|
+
value2 & 255
|
|
129501
129502
|
];
|
|
129502
129503
|
var pngChunk = (type, data) => {
|
|
129503
129504
|
const body = Uint8Array.from([...[...type].map((char) => char.charCodeAt(0)), ...data]);
|
|
@@ -129597,7 +129598,7 @@ var summarize = (payload) => {
|
|
|
129597
129598
|
return JSON.stringify(summary);
|
|
129598
129599
|
};
|
|
129599
129600
|
var SHAPE_MAX_KEYS = 24;
|
|
129600
|
-
var typeOfValue = (
|
|
129601
|
+
var typeOfValue = (value2) => Array.isArray(value2) ? `array(${String(value2.length)})` : value2 === null ? "null" : typeof value2;
|
|
129601
129602
|
var shapeOf = (payload) => {
|
|
129602
129603
|
const data = payload?.data;
|
|
129603
129604
|
if (data === null || typeof data !== "object" || Array.isArray(data)) return typeOfValue(data);
|
|
@@ -129745,17 +129746,17 @@ var parseSetCookie = (responseUrl, header) => {
|
|
|
129745
129746
|
for (const part of parts) {
|
|
129746
129747
|
const at = part.indexOf("=");
|
|
129747
129748
|
const key = (at >= 0 ? part.slice(0, at) : part).trim().toLowerCase();
|
|
129748
|
-
const
|
|
129749
|
-
if (key === "domain" &&
|
|
129750
|
-
domain =
|
|
129749
|
+
const value2 = at >= 0 ? part.slice(at + 1).trim() : "";
|
|
129750
|
+
if (key === "domain" && value2 !== "") {
|
|
129751
|
+
domain = value2.replace(/^\./, "").toLowerCase();
|
|
129751
129752
|
hostOnly = false;
|
|
129752
|
-
} else if (key === "path" &&
|
|
129753
|
+
} else if (key === "path" && value2 !== "") path = value2;
|
|
129753
129754
|
else if (key === "secure") secure = true;
|
|
129754
|
-
else if (key === "expires" &&
|
|
129755
|
-
const parsed = Date.parse(
|
|
129755
|
+
else if (key === "expires" && value2 !== "") {
|
|
129756
|
+
const parsed = Date.parse(value2);
|
|
129756
129757
|
if (Number.isFinite(parsed)) expiresAt = parsed;
|
|
129757
|
-
} else if (key === "max-age" &&
|
|
129758
|
-
const seconds = Number(
|
|
129758
|
+
} else if (key === "max-age" && value2 !== "") {
|
|
129759
|
+
const seconds = Number(value2);
|
|
129759
129760
|
if (Number.isFinite(seconds)) expiresAt = Date.now() + seconds * 1e3;
|
|
129760
129761
|
}
|
|
129761
129762
|
}
|
|
@@ -129852,8 +129853,8 @@ var QrLoginError = class extends Error {
|
|
|
129852
129853
|
this.reason = reason;
|
|
129853
129854
|
}
|
|
129854
129855
|
};
|
|
129855
|
-
var record = (
|
|
129856
|
-
var str = (
|
|
129856
|
+
var record = (value2) => value2 !== null && typeof value2 === "object" && !Array.isArray(value2) ? value2 : {};
|
|
129857
|
+
var str = (value2) => typeof value2 === "string" && value2 !== "" ? value2 : void 0;
|
|
129857
129858
|
var accountsUrl = (path, now) => (
|
|
129858
129859
|
// 查询串里那个带随机后缀的键只是防缓存,与服务端语义无关。
|
|
129859
129860
|
`${ACCOUNTS_ORIGIN}${path}?_r${String(1e4 + now % 8e4)}=${String(now)}`
|
|
@@ -130054,7 +130055,7 @@ var SetupFailure = class extends Error {
|
|
|
130054
130055
|
};
|
|
130055
130056
|
var newSession = () => {
|
|
130056
130057
|
const redactor = makeRedactor();
|
|
130057
|
-
return { jar: makeCookieJar((
|
|
130058
|
+
return { jar: makeCookieJar((value2) => redactor.register(value2)), redactor };
|
|
130058
130059
|
};
|
|
130059
130060
|
var errorText = (error) => error instanceof Error ? error.message : String(error);
|
|
130060
130061
|
var toFailure = (error, budgetExpired, redactor) => {
|
|
@@ -131514,14 +131515,14 @@ function decodeTrieDict(input, resultLength, atomCount, dict1AtomCount, ngramCou
|
|
|
131514
131515
|
for (let index = 0; index < ngramIndex; index++) {
|
|
131515
131516
|
for (let half = 0; half < 2; half++) {
|
|
131516
131517
|
const source = references[index * 2 + half];
|
|
131517
|
-
const
|
|
131518
|
-
if (
|
|
131518
|
+
const value2 = single[source];
|
|
131519
|
+
if (value2 < 0) {
|
|
131519
131520
|
let read = start[source];
|
|
131520
131521
|
const readEnd = read + length[source];
|
|
131521
131522
|
while (read < readEnd)
|
|
131522
131523
|
pool[write++] = pool[read++];
|
|
131523
131524
|
} else {
|
|
131524
|
-
pool[write++] =
|
|
131525
|
+
pool[write++] = value2;
|
|
131525
131526
|
}
|
|
131526
131527
|
}
|
|
131527
131528
|
}
|
|
@@ -131532,14 +131533,14 @@ function decodeTrieDict(input, resultLength, atomCount, dict1AtomCount, ngramCou
|
|
|
131532
131533
|
if (slot >= dictSize) {
|
|
131533
131534
|
slot = slot * base2 - twoCharBias + BASE91_INVERSE[input.charCodeAt(pos++)];
|
|
131534
131535
|
}
|
|
131535
|
-
const
|
|
131536
|
-
if (
|
|
131536
|
+
const value2 = single[slot];
|
|
131537
|
+
if (value2 < 0) {
|
|
131537
131538
|
let read = start[slot];
|
|
131538
131539
|
const readEnd = read + length[slot];
|
|
131539
131540
|
while (read < readEnd)
|
|
131540
131541
|
out[outIndex++] = pool[read++];
|
|
131541
131542
|
} else {
|
|
131542
|
-
out[outIndex++] =
|
|
131543
|
+
out[outIndex++] = value2;
|
|
131543
131544
|
}
|
|
131544
131545
|
}
|
|
131545
131546
|
return out;
|
|
@@ -131699,17 +131700,17 @@ function decodeWithTrie(input, isStrict, isAttribute) {
|
|
|
131699
131700
|
const entityStart = offset + 1;
|
|
131700
131701
|
const firstChar = input.charCodeAt(entityStart);
|
|
131701
131702
|
let consumed;
|
|
131702
|
-
let
|
|
131703
|
+
let value2;
|
|
131703
131704
|
if (firstChar === CharCodes.NUM) {
|
|
131704
131705
|
const packed = parseNumericEntity(input, entityStart, inputLength);
|
|
131705
131706
|
consumed = unpackConsumed(packed);
|
|
131706
131707
|
if (isStrict && consumed > 0 && input.charCodeAt(entityStart + consumed - 1) !== CharCodes.SEMI) {
|
|
131707
131708
|
consumed = 0;
|
|
131708
131709
|
}
|
|
131709
|
-
|
|
131710
|
+
value2 = consumed === 0 ? "" : codePointToString(packed & CODE_POINT_MASK);
|
|
131710
131711
|
} else if (isAlpha(firstChar)) {
|
|
131711
131712
|
consumed = 0;
|
|
131712
|
-
|
|
131713
|
+
value2 = "";
|
|
131713
131714
|
const rootSlotIndex = firstChar - rootJumpOffset;
|
|
131714
131715
|
let nodeIndex;
|
|
131715
131716
|
if (rootSlotIndex >>> 0 < rootBranchCount) {
|
|
@@ -131780,7 +131781,7 @@ function decodeWithTrie(input, isStrict, isAttribute) {
|
|
|
131780
131781
|
if (valueLength !== 0) {
|
|
131781
131782
|
if (char === CharCodes.SEMI) {
|
|
131782
131783
|
consumed = index - entityStart + 1;
|
|
131783
|
-
|
|
131784
|
+
value2 = valueLength === 1 ? String.fromCharCode(current & BinTrieFlags.VALUE_MASK) : readTrieValue(decodeTree, nodeIndex, valueLength);
|
|
131784
131785
|
break;
|
|
131785
131786
|
}
|
|
131786
131787
|
if (!isStrict && (current & BinTrieFlags.FLAG13) === 0) {
|
|
@@ -131798,7 +131799,7 @@ function decodeWithTrie(input, isStrict, isAttribute) {
|
|
|
131798
131799
|
current = decodeTree[nodeIndex];
|
|
131799
131800
|
index += 1;
|
|
131800
131801
|
}
|
|
131801
|
-
if (
|
|
131802
|
+
if (value2 === "") {
|
|
131802
131803
|
const finalVL = current >>> 14;
|
|
131803
131804
|
if (finalVL !== 0 && !isStrict && (current & BinTrieFlags.FLAG13) === 0) {
|
|
131804
131805
|
consumed = index - entityStart;
|
|
@@ -131806,12 +131807,12 @@ function decodeWithTrie(input, isStrict, isAttribute) {
|
|
|
131806
131807
|
bestValueLength = finalVL;
|
|
131807
131808
|
}
|
|
131808
131809
|
if (consumed > 0) {
|
|
131809
|
-
|
|
131810
|
+
value2 = readTrieValue(decodeTree, bestNodeIndex, bestValueLength);
|
|
131810
131811
|
}
|
|
131811
131812
|
}
|
|
131812
131813
|
} else {
|
|
131813
131814
|
consumed = 0;
|
|
131814
|
-
|
|
131815
|
+
value2 = "";
|
|
131815
131816
|
}
|
|
131816
131817
|
if (consumed === 0 || isAttribute && firstChar !== CharCodes.NUM && input.charCodeAt(entityStart + consumed - 1) !== CharCodes.SEMI && entityStart + consumed < inputLength && isEntityInAttributeInvalidEnd(input.charCodeAt(entityStart + consumed))) {
|
|
131817
131818
|
offset = entityStart;
|
|
@@ -131819,7 +131820,7 @@ function decodeWithTrie(input, isStrict, isAttribute) {
|
|
|
131819
131820
|
if (chunkStart < offset) {
|
|
131820
131821
|
result += input.slice(chunkStart, offset);
|
|
131821
131822
|
}
|
|
131822
|
-
result +=
|
|
131823
|
+
result += value2;
|
|
131823
131824
|
offset = chunkStart = entityStart + consumed;
|
|
131824
131825
|
}
|
|
131825
131826
|
if (input.charCodeAt(offset) !== CharCodes.AMP) {
|
|
@@ -132821,9 +132822,9 @@ var Token = class {
|
|
|
132821
132822
|
/**
|
|
132822
132823
|
* Set `name` attribute to `value`. Override old value if exists.
|
|
132823
132824
|
*/
|
|
132824
|
-
attrSet(name,
|
|
132825
|
+
attrSet(name, value2) {
|
|
132825
132826
|
const idx = this.attrIndex(name);
|
|
132826
|
-
const attrData = [name,
|
|
132827
|
+
const attrData = [name, value2];
|
|
132827
132828
|
if (idx < 0) this.attrPush(attrData);
|
|
132828
132829
|
else this.attrs[idx] = attrData;
|
|
132829
132830
|
}
|
|
@@ -132832,18 +132833,18 @@ var Token = class {
|
|
|
132832
132833
|
*/
|
|
132833
132834
|
attrGet(name) {
|
|
132834
132835
|
const idx = this.attrIndex(name);
|
|
132835
|
-
let
|
|
132836
|
-
if (idx >= 0)
|
|
132837
|
-
return
|
|
132836
|
+
let value2 = null;
|
|
132837
|
+
if (idx >= 0) value2 = this.attrs[idx][1];
|
|
132838
|
+
return value2;
|
|
132838
132839
|
}
|
|
132839
132840
|
/**
|
|
132840
132841
|
* Join value to existing attribute via space. Or create new attribute if not
|
|
132841
132842
|
* exists. Useful to operate with token classes.
|
|
132842
132843
|
*/
|
|
132843
|
-
attrJoin(name,
|
|
132844
|
+
attrJoin(name, value2) {
|
|
132844
132845
|
const idx = this.attrIndex(name);
|
|
132845
|
-
if (idx < 0) this.attrPush([name,
|
|
132846
|
-
else this.attrs[idx][1] = `${this.attrs[idx][1]} ${
|
|
132846
|
+
if (idx < 0) this.attrPush([name, value2]);
|
|
132847
|
+
else this.attrs[idx][1] = `${this.attrs[idx][1]} ${value2}`;
|
|
132847
132848
|
}
|
|
132848
132849
|
};
|
|
132849
132850
|
var Ruler = class {
|
|
@@ -136382,7 +136383,7 @@ var styledText = (text3, style) => {
|
|
|
136382
136383
|
if (style?.includes("underline")) out = `<u>${out}</u>`;
|
|
136383
136384
|
return out;
|
|
136384
136385
|
};
|
|
136385
|
-
var nonEmpty3 = (
|
|
136386
|
+
var nonEmpty3 = (value2) => typeof value2 === "string" && value2 !== "";
|
|
136386
136387
|
var resourceOf = (element, index) => {
|
|
136387
136388
|
if (element.tag === "img" && nonEmpty3(element.image_key)) {
|
|
136388
136389
|
return {
|
|
@@ -136517,8 +136518,8 @@ var readResource = (messageType, content) => {
|
|
|
136517
136518
|
const parsed = readJson(content);
|
|
136518
136519
|
if (parsed === null) return null;
|
|
136519
136520
|
const key = (field) => {
|
|
136520
|
-
const
|
|
136521
|
-
return typeof
|
|
136521
|
+
const value2 = parsed[field];
|
|
136522
|
+
return typeof value2 === "string" && value2 !== "" ? value2 : null;
|
|
136522
136523
|
};
|
|
136523
136524
|
if (messageType === "image") {
|
|
136524
136525
|
const imageKey = key("image_key");
|
|
@@ -136572,7 +136573,7 @@ var parseInboundMessage = (event, appId, groupMention = "always") => {
|
|
|
136572
136573
|
const single = post === void 0 ? readResource(messageType, message.content) : null;
|
|
136573
136574
|
const resources = post !== void 0 ? post.resources : single === null ? [] : [single];
|
|
136574
136575
|
const raw = post !== void 0 ? post.text : messageType === "text" ? readText(message.content) : null;
|
|
136575
|
-
const text3 = mentions.reduce((
|
|
136576
|
+
const text3 = mentions.reduce((value2, mention) => value2.replaceAll(mention.key, ""), raw ?? "").trim();
|
|
136576
136577
|
if (text3.length === 0 && resources.length === 0) return null;
|
|
136577
136578
|
return { messageId, chatId, chatType, senderOpenId, text: text3, resources };
|
|
136578
136579
|
};
|
|
@@ -136601,11 +136602,11 @@ var fetchMessageResource = async (input) => {
|
|
|
136601
136602
|
var cardActionValue = (event) => {
|
|
136602
136603
|
const roots = [event, event?.event];
|
|
136603
136604
|
for (const root of roots) {
|
|
136604
|
-
const
|
|
136605
|
-
if (
|
|
136606
|
-
if (typeof
|
|
136605
|
+
const value2 = root?.action?.value;
|
|
136606
|
+
if (value2 === void 0 || value2 === null) continue;
|
|
136607
|
+
if (typeof value2 !== "string") return value2;
|
|
136607
136608
|
try {
|
|
136608
|
-
return JSON.parse(
|
|
136609
|
+
return JSON.parse(value2);
|
|
136609
136610
|
} catch {
|
|
136610
136611
|
continue;
|
|
136611
136612
|
}
|
|
@@ -136617,10 +136618,10 @@ var cardActionToken = (event) => {
|
|
|
136617
136618
|
return typeof token === "string" && token.length > 0 ? token : null;
|
|
136618
136619
|
};
|
|
136619
136620
|
var cardActionPanel = (event) => {
|
|
136620
|
-
const
|
|
136621
|
-
const op =
|
|
136621
|
+
const value2 = cardActionValue(event);
|
|
136622
|
+
const op = value2?.["pn"];
|
|
136622
136623
|
if (typeof op !== "string" || op === "") return null;
|
|
136623
|
-
const arg =
|
|
136624
|
+
const arg = value2?.["a"];
|
|
136624
136625
|
const roots = [event, event?.event];
|
|
136625
136626
|
const pick = (read) => {
|
|
136626
136627
|
for (const root of roots) {
|
|
@@ -137131,7 +137132,7 @@ var en_default = {
|
|
|
137131
137132
|
},
|
|
137132
137133
|
wecomAppApiBaseUrl: {
|
|
137133
137134
|
label: "API proxy base (optional)",
|
|
137134
|
-
description: "Base URL for
|
|
137135
|
+
description: "Base URL for WeCom API calls (tokens, messages, images and files). Leave empty for qyapi.weixin.qq.com. The outbound IP must be on the app's trusted IP list.",
|
|
137135
137136
|
placeholder: "https://qyapi.weixin.qq.com"
|
|
137136
137137
|
},
|
|
137137
137138
|
wecomAppListenPort: {
|
|
@@ -137154,6 +137155,10 @@ var en_default = {
|
|
|
137154
137155
|
projectArchived: 'Project "{{title}}" is archived. Restore it, or send /repo to pick another project, then message again.',
|
|
137155
137156
|
projectMissing: "The project this chat was working on is no longer on this machine (it may have been deleted), so a thread cannot be started. Send /repo to pick another one.",
|
|
137156
137157
|
threadGone: "The earlier session was deleted or archived, so this chat now starts a new one.",
|
|
137158
|
+
turnFailed: "This turn didn't finish: {{detail}}\nReference {{ref}}. Send the message again; if it keeps failing, send /new to start a new conversation.",
|
|
137159
|
+
turnFailedNoDetail: "This turn didn't finish. Reference {{ref}}. Send the message again; if it keeps failing, send /new to start a new conversation.",
|
|
137160
|
+
turnFailedBrief: "This turn didn't finish: {{detail}}\nSend the message again; if it keeps failing, send /new to start a new conversation.",
|
|
137161
|
+
turnFailedBriefNoDetail: "This turn didn't finish. Send the message again; if it keeps failing, send /new to start a new conversation.",
|
|
137157
137162
|
teamGone: "The team this chat was sending to no longer exists, so messages go to a normal session again.",
|
|
137158
137163
|
attachmentReceived: "Got {{names}} ({{count}} waiting). Tell me what to do with them.",
|
|
137159
137164
|
attachmentFailed: "Could not take {{name}}: {{reason}}.",
|
|
@@ -137712,7 +137717,7 @@ var zh_CN_default = {
|
|
|
137712
137717
|
},
|
|
137713
137718
|
wecomAppApiBaseUrl: {
|
|
137714
137719
|
label: "API \u4EE3\u7406\u5730\u5740\uFF08\u53EF\u9009\uFF09",
|
|
137715
|
-
description: "\
|
|
137720
|
+
description: "\u4F01\u4E1A\u5FAE\u4FE1\u63A5\u53E3\u7684\u57FA\u5740\uFF08\u6362 token\u3001\u53D1\u6D88\u606F\u3001\u6536\u53D1\u56FE\u7247\u548C\u6587\u4EF6\uFF09\u3002\u7559\u7A7A\u5C31\u76F4\u8FDE qyapi.weixin.qq.com\u3002\u51FA\u7AD9 IP \u8981\u5728\u8FD9\u4E2A\u5E94\u7528\u7684\u4F01\u4E1A\u53EF\u4FE1 IP \u91CC\u3002",
|
|
137716
137721
|
placeholder: "https://qyapi.weixin.qq.com"
|
|
137717
137722
|
},
|
|
137718
137723
|
wecomAppListenPort: {
|
|
@@ -137735,6 +137740,10 @@ var zh_CN_default = {
|
|
|
137735
137740
|
projectArchived: "\u9879\u76EE\u300C{{title}}\u300D\u5DF2\u5F52\u6863\u3002\u6062\u590D\u5B83\uFF0C\u6216\u53D1 /repo \u6362\u4E2A\u9879\u76EE\uFF0C\u518D\u53D1\u6D88\u606F\u3002",
|
|
137736
137741
|
projectMissing: "\u8FD9\u4E2A\u804A\u5929\u539F\u6765\u505A\u7684\u9879\u76EE\u5DF2\u7ECF\u4E0D\u5728\u8FD9\u53F0\u673A\u5668\u4E0A\u4E86\uFF08\u53EF\u80FD\u88AB\u5220\u4E86\uFF09\uFF0C\u5F00\u4E0D\u4E86\u4F1A\u8BDD\u3002\u53D1 /repo \u91CD\u65B0\u9009\u4E00\u4E2A\u3002",
|
|
137737
137742
|
threadGone: "\u4E4B\u524D\u90A3\u6761\u4F1A\u8BDD\u5DF2\u88AB\u5220\u9664\u6216\u5F52\u6863\uFF0C\u8FD9\u4E2A\u804A\u5929\u6539\u4E3A\u5F00\u4E00\u6761\u65B0\u4F1A\u8BDD\u3002",
|
|
137743
|
+
turnFailed: "\u8FD9\u4E00\u8F6E\u6CA1\u80FD\u5B8C\u6210\uFF1A{{detail}}\n\u53C2\u8003\u53F7 {{ref}}\u3002\u53EF\u4EE5\u76F4\u63A5\u518D\u53D1\u4E00\u6B21\uFF1B\u4E00\u76F4\u4E0D\u884C\u5C31\u53D1 /new \u5F00\u4E2A\u65B0\u4F1A\u8BDD\u3002",
|
|
137744
|
+
turnFailedNoDetail: "\u8FD9\u4E00\u8F6E\u6CA1\u80FD\u5B8C\u6210\u3002\u53C2\u8003\u53F7 {{ref}}\u3002\u53EF\u4EE5\u76F4\u63A5\u518D\u53D1\u4E00\u6B21\uFF1B\u4E00\u76F4\u4E0D\u884C\u5C31\u53D1 /new \u5F00\u4E2A\u65B0\u4F1A\u8BDD\u3002",
|
|
137745
|
+
turnFailedBrief: "\u8FD9\u4E00\u8F6E\u6CA1\u80FD\u5B8C\u6210\uFF1A{{detail}}\n\u53EF\u4EE5\u76F4\u63A5\u518D\u53D1\u4E00\u6B21\uFF1B\u4E00\u76F4\u4E0D\u884C\u5C31\u53D1 /new \u5F00\u4E2A\u65B0\u4F1A\u8BDD\u3002",
|
|
137746
|
+
turnFailedBriefNoDetail: "\u8FD9\u4E00\u8F6E\u6CA1\u80FD\u5B8C\u6210\u3002\u53EF\u4EE5\u76F4\u63A5\u518D\u53D1\u4E00\u6B21\uFF1B\u4E00\u76F4\u4E0D\u884C\u5C31\u53D1 /new \u5F00\u4E2A\u65B0\u4F1A\u8BDD\u3002",
|
|
137738
137747
|
teamGone: "\u8FD9\u4E2A\u804A\u5929\u539F\u6765\u6D3E\u7ED9\u7684\u961F\u5DF2\u7ECF\u4E0D\u5728\u4E86\uFF0C\u63A5\u4E0B\u6765\u6539\u56DE\u666E\u901A\u4F1A\u8BDD\u3002",
|
|
137739
137748
|
attachmentReceived: "\u6536\u5230 {{names}}\uFF08\u73B0\u6709 {{count}} \u4E2A\u5F85\u5904\u7406\uFF09\u3002\u8BF4\u4E00\u53E5\u60F3\u8BA9\u6211\u600E\u4E48\u5904\u7406\u3002",
|
|
137740
137749
|
attachmentFailed: "\u6CA1\u80FD\u6536\u4E0B {{name}}\uFF1A{{reason}}\u3002",
|
|
@@ -138126,7 +138135,7 @@ var zh_CN_default = {
|
|
|
138126
138135
|
|
|
138127
138136
|
// src/messages.ts
|
|
138128
138137
|
var DEFAULT_REPLY_LANGUAGE = "zh-CN";
|
|
138129
|
-
var parseReplyLanguage = (
|
|
138138
|
+
var parseReplyLanguage = (value2) => value2 === "en" ? "en" : DEFAULT_REPLY_LANGUAGE;
|
|
138130
138139
|
var CATALOGS = { en: en_default, "zh-CN": zh_CN_default };
|
|
138131
138140
|
var lookup = (catalog, key) => {
|
|
138132
138141
|
let node = catalog;
|
|
@@ -138137,8 +138146,8 @@ var lookup = (catalog, key) => {
|
|
|
138137
138146
|
return typeof node === "string" ? node : void 0;
|
|
138138
138147
|
};
|
|
138139
138148
|
var interpolate = (template, params) => params === void 0 ? template : template.replace(/{{\s*([\w.]+)\s*}}/g, (whole, name) => {
|
|
138140
|
-
const
|
|
138141
|
-
return
|
|
138149
|
+
const value2 = params[name];
|
|
138150
|
+
return value2 === void 0 ? whole : String(value2);
|
|
138142
138151
|
});
|
|
138143
138152
|
var makeTranslate = (language) => {
|
|
138144
138153
|
const catalog = CATALOGS[language];
|
|
@@ -138233,7 +138242,8 @@ var THREAD_PROJECT_CACHE_LIMIT = 256;
|
|
|
138233
138242
|
var makeNotifications = (core, deps) => {
|
|
138234
138243
|
const { host, adapterFor, deliver, bindingForChatKey, ready } = core;
|
|
138235
138244
|
const { clearWorking } = deps;
|
|
138236
|
-
const {
|
|
138245
|
+
const { turnCards } = deps.replyCards;
|
|
138246
|
+
const { failures } = deps;
|
|
138237
138247
|
const projectByThread = /* @__PURE__ */ new Map();
|
|
138238
138248
|
const projectOfThread = async (threadId) => {
|
|
138239
138249
|
const known = projectByThread.get(threadId);
|
|
@@ -138294,12 +138304,21 @@ ${final.text}`;
|
|
|
138294
138304
|
const threadId = event.threadId;
|
|
138295
138305
|
if (threadId === null) return;
|
|
138296
138306
|
threadsWithSomethingToReport.delete(threadId);
|
|
138297
|
-
failureSummaries.set(threadId, event.summary);
|
|
138298
138307
|
await ready;
|
|
138299
|
-
|
|
138308
|
+
const targets = targetsForProject(await projectOfThread(threadId));
|
|
138309
|
+
const textTargets = targets.filter(
|
|
138310
|
+
(binding) => !(streamsTo(binding, threadId) && turnCards.covers(threadId))
|
|
138311
|
+
);
|
|
138312
|
+
const drawingTurn = turnCards.drawingTurn(threadId);
|
|
138313
|
+
const notice = textTargets.length > 0 || drawingTurn !== null ? failures.forFailure(
|
|
138314
|
+
threadId,
|
|
138315
|
+
(await host.projections.getThread(threadId).catch(() => null))?.session?.lastError
|
|
138316
|
+
) : null;
|
|
138317
|
+
if (notice !== null && drawingTurn !== null)
|
|
138318
|
+
failures.holdForCard(threadId, drawingTurn, notice);
|
|
138319
|
+
for (const binding of targets) {
|
|
138300
138320
|
await clearWorking(binding, threadId);
|
|
138301
|
-
if (
|
|
138302
|
-
await deliver(binding, event.summary);
|
|
138321
|
+
if (notice !== null && textTargets.includes(binding)) await deliver(binding, notice);
|
|
138303
138322
|
}
|
|
138304
138323
|
});
|
|
138305
138324
|
const rememberThreadProject = (threadId, projectId) => {
|
|
@@ -138923,6 +138942,64 @@ var makeProjectRows = (core) => {
|
|
|
138923
138942
|
return { projectRowsFor, listedProjectsByChat };
|
|
138924
138943
|
};
|
|
138925
138944
|
|
|
138945
|
+
// src/diagnostics.ts
|
|
138946
|
+
var PREFIX = {
|
|
138947
|
+
conn: "IM-CONN",
|
|
138948
|
+
msg: "IM-MSG",
|
|
138949
|
+
setup: "IM-SETUP"
|
|
138950
|
+
};
|
|
138951
|
+
var shortSalt = () => {
|
|
138952
|
+
const bytes = new Uint8Array(2);
|
|
138953
|
+
crypto.getRandomValues(bytes);
|
|
138954
|
+
return Array.from(bytes, (b) => b.toString(16).toUpperCase().padStart(2, "0")).join("");
|
|
138955
|
+
};
|
|
138956
|
+
var diagnosticRef = (kind, nowMs = Date.now()) => {
|
|
138957
|
+
const stamp = nowMs.toString(36).toUpperCase();
|
|
138958
|
+
return `${PREFIX[kind]}-${stamp}-${shortSalt()}`;
|
|
138959
|
+
};
|
|
138960
|
+
var formatDiagnosticCopy = (report) => [
|
|
138961
|
+
`ref=${report.ref}`,
|
|
138962
|
+
`ok=${report.ok ? "yes" : "no"}`,
|
|
138963
|
+
`platform=${report.platform}`,
|
|
138964
|
+
`bot=${report.botName}`,
|
|
138965
|
+
`row=${report.rowId}`,
|
|
138966
|
+
`stage=${report.stage}`,
|
|
138967
|
+
`at=${report.at}`,
|
|
138968
|
+
`detail=${report.detail}`
|
|
138969
|
+
].join("\n");
|
|
138970
|
+
|
|
138971
|
+
// src/failureNotices.ts
|
|
138972
|
+
var makeFailureNotices = (core) => {
|
|
138973
|
+
const heldForCard = /* @__PURE__ */ new Map();
|
|
138974
|
+
const reasonOf2 = (detail) => detail?.trim() ?? "";
|
|
138975
|
+
return {
|
|
138976
|
+
/** 一次失败事件的那句话(带新参考号,同号进日志)。 */
|
|
138977
|
+
forFailure: (threadId, detail) => {
|
|
138978
|
+
const reference2 = diagnosticRef("msg");
|
|
138979
|
+
core.host.log.warn("chat turn failed", { threadId, reference: reference2 });
|
|
138980
|
+
const said = reasonOf2(detail);
|
|
138981
|
+
const text3 = said === "" ? core.t("reply.turnFailedNoDetail", { ref: reference2 }) : core.t("reply.turnFailed", { detail: said, ref: reference2 });
|
|
138982
|
+
return text3;
|
|
138983
|
+
},
|
|
138984
|
+
/** 正在画的那一轮的卡会说这次失败:寄存给它。 */
|
|
138985
|
+
holdForCard: (threadId, turnId, text3) => {
|
|
138986
|
+
heldForCard.set(threadId, { turnId, text: text3 });
|
|
138987
|
+
},
|
|
138988
|
+
/**
|
|
138989
|
+
* 卡收尾(无论怎么收的都调):清掉这条会话的寄存。失败收尾时,寄存是这一轮的就用它(同一个号),
|
|
138990
|
+
* 否则只写原因与下一步,不另取号。不是失败收尾回 null。
|
|
138991
|
+
*/
|
|
138992
|
+
forCard: (threadId, turnId, detail, failed) => {
|
|
138993
|
+
const held = heldForCard.get(threadId);
|
|
138994
|
+
heldForCard.delete(threadId);
|
|
138995
|
+
if (!failed) return null;
|
|
138996
|
+
if (held !== void 0 && held.turnId === turnId) return held.text;
|
|
138997
|
+
const said = reasonOf2(detail);
|
|
138998
|
+
return said === "" ? core.t("reply.turnFailedBriefNoDetail") : core.t("reply.turnFailedBrief", { detail: said });
|
|
138999
|
+
}
|
|
139000
|
+
};
|
|
139001
|
+
};
|
|
139002
|
+
|
|
138926
139003
|
// src/replyCards.ts
|
|
138927
139004
|
import {
|
|
138928
139005
|
readTurnProgress,
|
|
@@ -139056,7 +139133,7 @@ var makeTurnCards = (deps) => {
|
|
|
139056
139133
|
}
|
|
139057
139134
|
if (item.phase === "ended") {
|
|
139058
139135
|
if (live === null && deps.resolveTarget(threadId) === null) return;
|
|
139059
|
-
await finalize(slot, threadId, item, await deps.endOf(threadId));
|
|
139136
|
+
await finalize(slot, threadId, item, await deps.endOf(threadId, item.turnId));
|
|
139060
139137
|
return;
|
|
139061
139138
|
}
|
|
139062
139139
|
erroredThreads.delete(threadId);
|
|
@@ -139142,6 +139219,11 @@ var makeTurnCards = (deps) => {
|
|
|
139142
139219
|
void pump(threadId, slot);
|
|
139143
139220
|
}
|
|
139144
139221
|
},
|
|
139222
|
+
/** 这条会话正在画卡的那一轮;没有在画的卡是 null。 */
|
|
139223
|
+
drawingTurn: (threadId) => {
|
|
139224
|
+
const live = slots.get(threadId)?.live;
|
|
139225
|
+
return live?.card != null ? live.turnId : null;
|
|
139226
|
+
},
|
|
139145
139227
|
/** 这条会话现在有一张在画的卡,或者上一轮刚以失败收了卡:失败原因已经在卡上了。 */
|
|
139146
139228
|
covers: (threadId) => slots.get(threadId)?.live?.card != null || erroredThreads.has(threadId),
|
|
139147
139229
|
/** 插件停用:放下所有在画的卡,不再发任何更新。卡会停在最后一拍,重启时被标「已中断」。 */
|
|
@@ -139154,9 +139236,8 @@ var makeTurnCards = (deps) => {
|
|
|
139154
139236
|
};
|
|
139155
139237
|
|
|
139156
139238
|
// src/replyCards.ts
|
|
139157
|
-
var makeReplyCards = (core) => {
|
|
139239
|
+
var makeReplyCards = (core, failures) => {
|
|
139158
139240
|
const { host, adapterFor, commit, deliver, bindingForChatKey, bindingOfThread, ready } = core;
|
|
139159
|
-
const failureSummaries = /* @__PURE__ */ new Map();
|
|
139160
139241
|
const stopRequested = /* @__PURE__ */ new Set();
|
|
139161
139242
|
const turnCards = makeTurnCards({
|
|
139162
139243
|
ready,
|
|
@@ -139179,15 +139260,17 @@ var makeReplyCards = (core) => {
|
|
|
139179
139260
|
);
|
|
139180
139261
|
return turnTitleOf(asked?.text ?? thread?.title ?? "");
|
|
139181
139262
|
},
|
|
139182
|
-
endOf: async (threadId) => {
|
|
139263
|
+
endOf: async (threadId, turnId) => {
|
|
139183
139264
|
const stopped = stopRequested.delete(threadId);
|
|
139184
|
-
const failure2 = failureSummaries.get(threadId);
|
|
139185
|
-
failureSummaries.delete(threadId);
|
|
139186
139265
|
const thread = await host.projections.getThread(threadId).catch(() => null);
|
|
139187
139266
|
const session = thread?.session;
|
|
139188
|
-
|
|
139189
|
-
|
|
139190
|
-
|
|
139267
|
+
const errorText2 = failures.forCard(
|
|
139268
|
+
threadId,
|
|
139269
|
+
turnId,
|
|
139270
|
+
session?.lastError,
|
|
139271
|
+
session?.status === "error"
|
|
139272
|
+
);
|
|
139273
|
+
if (errorText2 !== null) return { status: "error", errorText: errorText2 };
|
|
139191
139274
|
if (stopped || session?.status === "interrupted" || session?.status === "stopped") {
|
|
139192
139275
|
return { status: "interrupted", errorText: null };
|
|
139193
139276
|
}
|
|
@@ -139239,7 +139322,7 @@ var makeReplyCards = (core) => {
|
|
|
139239
139322
|
commit("turn-card-closed", { cardId });
|
|
139240
139323
|
}
|
|
139241
139324
|
});
|
|
139242
|
-
return { turnCards,
|
|
139325
|
+
return { turnCards, stopRequested };
|
|
139243
139326
|
};
|
|
139244
139327
|
|
|
139245
139328
|
// src/adapter.ts
|
|
@@ -139258,7 +139341,7 @@ var DELIVERY_SEND_ERROR_CODES = [
|
|
|
139258
139341
|
"bot-not-connected",
|
|
139259
139342
|
"delivery-failed"
|
|
139260
139343
|
];
|
|
139261
|
-
var isDeliverySendErrorCode = (
|
|
139344
|
+
var isDeliverySendErrorCode = (value2) => typeof value2 === "string" && DELIVERY_SEND_ERROR_CODES.includes(value2);
|
|
139262
139345
|
var DeliverySendError = class extends Error {
|
|
139263
139346
|
code;
|
|
139264
139347
|
constructor(code2, message) {
|
|
@@ -139976,6 +140059,26 @@ var makeTelegramApi = (input) => {
|
|
|
139976
140059
|
(row) => row.map((button) => ({ text: button.text, callback_data: button.data }))
|
|
139977
140060
|
)
|
|
139978
140061
|
});
|
|
140062
|
+
const sendSingle = async (method, chatId, body, rows) => {
|
|
140063
|
+
const sent = await call(method, {
|
|
140064
|
+
chat_id: chatId,
|
|
140065
|
+
...body,
|
|
140066
|
+
...rows === void 0 ? {} : { reply_markup: keyboard(rows) }
|
|
140067
|
+
});
|
|
140068
|
+
return sent?.message_id === void 0 ? null : String(sent.message_id);
|
|
140069
|
+
};
|
|
140070
|
+
const editSingle = async (chatId, messageId, body, rows) => {
|
|
140071
|
+
try {
|
|
140072
|
+
await call("editMessageText", {
|
|
140073
|
+
chat_id: chatId,
|
|
140074
|
+
message_id: Number(messageId),
|
|
140075
|
+
...body,
|
|
140076
|
+
reply_markup: keyboard(rows)
|
|
140077
|
+
});
|
|
140078
|
+
} catch (error) {
|
|
140079
|
+
if (!isNotModified(error)) throw error;
|
|
140080
|
+
}
|
|
140081
|
+
};
|
|
139979
140082
|
return {
|
|
139980
140083
|
/** 机器人自己是谁;群里的命令靠它的 `username` 认出是不是发给自己的。 */
|
|
139981
140084
|
getMe: () => call("getMe", {}),
|
|
@@ -140001,41 +140104,29 @@ var makeTelegramApi = (input) => {
|
|
|
140001
140104
|
* 发一条消息,回它的 id。调用方保证 `text` 不超过单条上限(边写边更新的回复要自己
|
|
140002
140105
|
* 在上限处翻篇,这里不替它切)。带 `rows` 就挂一块内联键盘。
|
|
140003
140106
|
*/
|
|
140004
|
-
sendOne:
|
|
140005
|
-
|
|
140006
|
-
|
|
140007
|
-
|
|
140008
|
-
|
|
140009
|
-
|
|
140010
|
-
return sent?.message_id === void 0 ? null : String(sent.message_id);
|
|
140011
|
-
},
|
|
140107
|
+
sendOne: (chatId, text3, rows) => sendSingle("sendMessage", chatId, { text: text3 }, rows),
|
|
140108
|
+
/**
|
|
140109
|
+
* 发一条富文本,回它的 id。`markdown` 已是平台要的样子。带 `rows` 就挂一块内联键盘。
|
|
140110
|
+
* 调用方保证不超富文本单条上限(这里不替它切)。
|
|
140111
|
+
*/
|
|
140112
|
+
sendRichOne: (chatId, markdown, rows) => sendSingle("sendRichMessage", chatId, { rich_message: { markdown } }, rows),
|
|
140012
140113
|
/**
|
|
140013
140114
|
* 改一条已发出的消息。内容没变(`message is not modified`)当成功。`rows` 不给就是
|
|
140014
140115
|
* 去掉按钮:改了文字又要保留按钮的调用方得自己再传一次。
|
|
140015
140116
|
*/
|
|
140016
|
-
editMessage:
|
|
140017
|
-
|
|
140018
|
-
|
|
140019
|
-
|
|
140020
|
-
|
|
140021
|
-
|
|
140022
|
-
reply_markup: keyboard(rows)
|
|
140023
|
-
});
|
|
140024
|
-
} catch (error) {
|
|
140025
|
-
if (!isNotModified(error)) throw error;
|
|
140026
|
-
}
|
|
140027
|
-
},
|
|
140117
|
+
editMessage: (chatId, messageId, text3, rows = []) => editSingle(chatId, messageId, { text: text3 }, rows),
|
|
140118
|
+
/**
|
|
140119
|
+
* 把一条已发出的消息改成富文本。不带 `text`,只带 `rich_message`。内容没变
|
|
140120
|
+
* (`message is not modified`)当成功。`rows` 不给就是去掉按钮。
|
|
140121
|
+
*/
|
|
140122
|
+
editRich: (chatId, messageId, markdown, rows = []) => editSingle(chatId, messageId, { rich_message: { markdown } }, rows),
|
|
140028
140123
|
/** 带按钮的审批消息,一行一个按钮;回消息 id,之后才改得了它(平台没给就是 null)。 */
|
|
140029
|
-
sendButtons:
|
|
140030
|
-
|
|
140031
|
-
|
|
140032
|
-
|
|
140033
|
-
|
|
140034
|
-
|
|
140035
|
-
)
|
|
140036
|
-
});
|
|
140037
|
-
return sent?.message_id === void 0 ? null : String(sent.message_id);
|
|
140038
|
-
},
|
|
140124
|
+
sendButtons: (chatId, text3, buttons) => sendSingle(
|
|
140125
|
+
"sendMessage",
|
|
140126
|
+
chatId,
|
|
140127
|
+
{ text: text3 },
|
|
140128
|
+
buttons.map((button) => [{ text: button.label, data: button.token }])
|
|
140129
|
+
),
|
|
140039
140130
|
/** 答完点击,不然客户端上那个按钮一直转圈。带 `text` 时点击者会看到一句提示。 */
|
|
140040
140131
|
answerCallback: (callbackQueryId, text3) => call("answerCallbackQuery", {
|
|
140041
140132
|
callback_query_id: callbackQueryId,
|
|
@@ -140101,6 +140192,24 @@ var parsePanelData = (data) => {
|
|
|
140101
140192
|
return { version: Number(match[1]), index: Number(match[2]) };
|
|
140102
140193
|
};
|
|
140103
140194
|
|
|
140195
|
+
// src/telegramRichText.ts
|
|
140196
|
+
var TELEGRAM_RICH_TEXT_LIMIT = 3e4;
|
|
140197
|
+
var escapeCharacter = (character) => {
|
|
140198
|
+
if (character === "&") return "&";
|
|
140199
|
+
if (character === "<") return "<";
|
|
140200
|
+
if (character === ">") return ">";
|
|
140201
|
+
return character;
|
|
140202
|
+
};
|
|
140203
|
+
var escapedMarkdown = (value2) => Array.from(value2, escapeCharacter).join("");
|
|
140204
|
+
var fencesAreComplete = (markdown) => (markdown.match(/^```[^\n]*(?:\n|$)/gm)?.length ?? 0) % 2 === 0;
|
|
140205
|
+
var toTelegramRichMarkdown = (value2) => {
|
|
140206
|
+
if (value2.trim() === "") return null;
|
|
140207
|
+
if (!fencesAreComplete(value2)) return null;
|
|
140208
|
+
const markdown = escapedMarkdown(value2);
|
|
140209
|
+
if (Array.from(markdown).length > TELEGRAM_RICH_TEXT_LIMIT) return null;
|
|
140210
|
+
return markdown;
|
|
140211
|
+
};
|
|
140212
|
+
|
|
140104
140213
|
// src/plainTurnText.ts
|
|
140105
140214
|
var RUNNING_LABEL_MAX_CHARS = 200;
|
|
140106
140215
|
var clip3 = (text3, max) => {
|
|
@@ -140202,13 +140311,23 @@ var makeTelegramAdapter = (deps) => {
|
|
|
140202
140311
|
throw error;
|
|
140203
140312
|
}
|
|
140204
140313
|
};
|
|
140314
|
+
const withRichFallback = async (markdown, rich, plain) => {
|
|
140315
|
+
if (markdown !== null) {
|
|
140316
|
+
try {
|
|
140317
|
+
return await withFloodWait(() => rich(markdown));
|
|
140318
|
+
} catch (error) {
|
|
140319
|
+
if (!(error instanceof TelegramApiError) || error.code !== 400) throw error;
|
|
140320
|
+
}
|
|
140321
|
+
}
|
|
140322
|
+
return withFloodWait(plain);
|
|
140323
|
+
};
|
|
140205
140324
|
const remembering = () => {
|
|
140206
140325
|
const entries = /* @__PURE__ */ new Map();
|
|
140207
140326
|
return {
|
|
140208
140327
|
get: (key) => entries.get(key),
|
|
140209
|
-
set: (key,
|
|
140328
|
+
set: (key, value2) => {
|
|
140210
140329
|
entries.delete(key);
|
|
140211
|
-
entries.set(key,
|
|
140330
|
+
entries.set(key, value2);
|
|
140212
140331
|
if (entries.size > REMEMBERED_CARD_LIMIT) {
|
|
140213
140332
|
const oldest = entries.keys().next().value;
|
|
140214
140333
|
if (oldest !== void 0) entries.delete(oldest);
|
|
@@ -140248,8 +140367,16 @@ var makeTelegramAdapter = (deps) => {
|
|
|
140248
140367
|
limit: TELEGRAM_TEXT_MAX_CHARS,
|
|
140249
140368
|
...resume === void 0 ? {} : { resume },
|
|
140250
140369
|
messages: {
|
|
140251
|
-
send: (text3) =>
|
|
140252
|
-
|
|
140370
|
+
send: (text3) => withRichFallback(
|
|
140371
|
+
toTelegramRichMarkdown(text3),
|
|
140372
|
+
(markdown) => api.sendRichOne(chatId, markdown),
|
|
140373
|
+
() => api.sendOne(chatId, text3)
|
|
140374
|
+
),
|
|
140375
|
+
edit: (messageId, text3) => withRichFallback(
|
|
140376
|
+
toTelegramRichMarkdown(text3),
|
|
140377
|
+
(markdown) => api.editRich(chatId, messageId, markdown),
|
|
140378
|
+
() => api.editMessage(chatId, messageId, text3)
|
|
140379
|
+
)
|
|
140253
140380
|
}
|
|
140254
140381
|
});
|
|
140255
140382
|
return {
|
|
@@ -140695,32 +140822,6 @@ var makeWebSync = (core) => {
|
|
|
140695
140822
|
return { noteInboundUserMessage };
|
|
140696
140823
|
};
|
|
140697
140824
|
|
|
140698
|
-
// src/diagnostics.ts
|
|
140699
|
-
var PREFIX = {
|
|
140700
|
-
conn: "IM-CONN",
|
|
140701
|
-
msg: "IM-MSG",
|
|
140702
|
-
setup: "IM-SETUP"
|
|
140703
|
-
};
|
|
140704
|
-
var shortSalt = () => {
|
|
140705
|
-
const bytes = new Uint8Array(2);
|
|
140706
|
-
crypto.getRandomValues(bytes);
|
|
140707
|
-
return Array.from(bytes, (b) => b.toString(16).toUpperCase().padStart(2, "0")).join("");
|
|
140708
|
-
};
|
|
140709
|
-
var diagnosticRef = (kind, nowMs = Date.now()) => {
|
|
140710
|
-
const stamp = nowMs.toString(36).toUpperCase();
|
|
140711
|
-
return `${PREFIX[kind]}-${stamp}-${shortSalt()}`;
|
|
140712
|
-
};
|
|
140713
|
-
var formatDiagnosticCopy = (report) => [
|
|
140714
|
-
`ref=${report.ref}`,
|
|
140715
|
-
`ok=${report.ok ? "yes" : "no"}`,
|
|
140716
|
-
`platform=${report.platform}`,
|
|
140717
|
-
`bot=${report.botName}`,
|
|
140718
|
-
`row=${report.rowId}`,
|
|
140719
|
-
`stage=${report.stage}`,
|
|
140720
|
-
`at=${report.at}`,
|
|
140721
|
-
`detail=${report.detail}`
|
|
140722
|
-
].join("\n");
|
|
140723
|
-
|
|
140724
140825
|
// src/settingsRowActions.ts
|
|
140725
140826
|
var ROW_PAYLOAD_SCHEMA = {
|
|
140726
140827
|
type: "object",
|
|
@@ -141043,7 +141144,7 @@ var parseWecomMessage = (frame, botId) => {
|
|
|
141043
141144
|
const chatId = body.chatid ?? body.from?.userid;
|
|
141044
141145
|
if (typeof messageId !== "string" || typeof chatId !== "string") return null;
|
|
141045
141146
|
const ownIds = [...new Set([body.aibotid, botId].filter((id) => Boolean(id)))];
|
|
141046
|
-
const stripOwn = (
|
|
141147
|
+
const stripOwn = (value2) => ownIds.reduce((rest, id) => rest.replaceAll(`@${id}`, ""), value2);
|
|
141047
141148
|
let mentionSource = "";
|
|
141048
141149
|
let text3 = "";
|
|
141049
141150
|
const resources = [];
|
|
@@ -141383,11 +141484,11 @@ var decryptWecomMedia = (cipher, aesKey) => {
|
|
|
141383
141484
|
if ("reason" in unpadded) throw new WecomDecryptError(unpadded.reason);
|
|
141384
141485
|
return new Uint8Array(unpadded.bytes);
|
|
141385
141486
|
};
|
|
141386
|
-
var decodeQuietly = (
|
|
141487
|
+
var decodeQuietly = (value2) => {
|
|
141387
141488
|
try {
|
|
141388
|
-
return decodeURIComponent(
|
|
141489
|
+
return decodeURIComponent(value2);
|
|
141389
141490
|
} catch {
|
|
141390
|
-
return
|
|
141491
|
+
return value2;
|
|
141391
141492
|
}
|
|
141392
141493
|
};
|
|
141393
141494
|
var filenameFromContentDisposition = (header) => {
|
|
@@ -141660,27 +141761,28 @@ var WecomAppApiError = class extends Error {
|
|
|
141660
141761
|
this.hint = extras?.hint;
|
|
141661
141762
|
}
|
|
141662
141763
|
};
|
|
141663
|
-
var cleanString = (
|
|
141664
|
-
if (typeof
|
|
141665
|
-
const trimmed =
|
|
141764
|
+
var cleanString = (value2) => {
|
|
141765
|
+
if (typeof value2 !== "string") return null;
|
|
141766
|
+
const trimmed = value2.trim();
|
|
141666
141767
|
return trimmed === "" ? null : trimmed;
|
|
141667
141768
|
};
|
|
141668
|
-
var
|
|
141669
|
-
|
|
141769
|
+
var isHttpUrl = (raw) => /^https?:\/\//iu.test(raw) && URL.canParse(raw);
|
|
141770
|
+
var normalizeApiBaseUrl = (value2) => {
|
|
141771
|
+
const raw = cleanString(value2);
|
|
141670
141772
|
if (raw === null) return WECOM_APP_DEFAULT_API_BASE;
|
|
141671
|
-
if (
|
|
141773
|
+
if (!isHttpUrl(raw)) {
|
|
141672
141774
|
throw new WecomAppApiError("invalid-api-base", "API base must be an http(s) URL.");
|
|
141673
141775
|
}
|
|
141674
141776
|
return raw.replace(/\/+$/u, "");
|
|
141675
141777
|
};
|
|
141676
|
-
var byteLength = (
|
|
141778
|
+
var byteLength = (value2) => Buffer.byteLength(value2, "utf8");
|
|
141677
141779
|
var splitUtf8ByBytes = (text3, maxBytes = WECOM_APP_TEXT_MAX_BYTES) => {
|
|
141678
|
-
const
|
|
141679
|
-
if (
|
|
141780
|
+
const value2 = typeof text3 === "string" ? text3 : "";
|
|
141781
|
+
if (value2 === "") return [""];
|
|
141680
141782
|
const chunks = [];
|
|
141681
141783
|
let current = "";
|
|
141682
141784
|
let currentBytes = 0;
|
|
141683
|
-
for (const char of
|
|
141785
|
+
for (const char of value2) {
|
|
141684
141786
|
const size = byteLength(char);
|
|
141685
141787
|
if (currentBytes + size > maxBytes && current.length > 0) {
|
|
141686
141788
|
chunks.push(current);
|
|
@@ -141745,46 +141847,129 @@ var WecomAppApi = class {
|
|
|
141745
141847
|
async sendText(input) {
|
|
141746
141848
|
const chunks = splitUtf8ByBytes(input.content);
|
|
141747
141849
|
for (const chunk of chunks) {
|
|
141748
|
-
await this.#
|
|
141850
|
+
await this.#send(
|
|
141851
|
+
{ touser: input.userId, msgtype: "text", text: { content: chunk } },
|
|
141852
|
+
input.signal
|
|
141853
|
+
);
|
|
141854
|
+
}
|
|
141855
|
+
}
|
|
141856
|
+
/** 发一条图片或文件消息,`mediaId` 来自 {@link uploadMedia}。 */
|
|
141857
|
+
async sendMedia(input) {
|
|
141858
|
+
await this.#send(
|
|
141859
|
+
{
|
|
141749
141860
|
touser: input.userId,
|
|
141750
|
-
msgtype:
|
|
141751
|
-
|
|
141752
|
-
|
|
141753
|
-
|
|
141754
|
-
|
|
141861
|
+
msgtype: input.mediaType,
|
|
141862
|
+
[input.mediaType]: { media_id: input.mediaId }
|
|
141863
|
+
},
|
|
141864
|
+
input.signal
|
|
141865
|
+
);
|
|
141866
|
+
}
|
|
141867
|
+
/** 传一份临时素材,回 `media_id`。空字节与过小的文件企微会拒,调用方先按上限卡。 */
|
|
141868
|
+
async uploadMedia(input) {
|
|
141869
|
+
const token = await this.getAccessToken(input.signal);
|
|
141870
|
+
const url = new URL("/cgi-bin/media/upload", this.apiBaseUrl);
|
|
141871
|
+
url.searchParams.set("access_token", token);
|
|
141872
|
+
url.searchParams.set("type", input.mediaType);
|
|
141873
|
+
const form = new FormData();
|
|
141874
|
+
form.set(
|
|
141875
|
+
"media",
|
|
141876
|
+
new Blob([new Uint8Array(input.bytes)], { type: input.mimeType }),
|
|
141877
|
+
input.name
|
|
141878
|
+
);
|
|
141879
|
+
const payload = await this.#requestJson(url, {
|
|
141880
|
+
method: "POST",
|
|
141881
|
+
// 不设 content-type:multipart 的 boundary 要让 fetch 自己写。
|
|
141882
|
+
body: form,
|
|
141883
|
+
...input.signal === void 0 ? {} : { signal: input.signal }
|
|
141884
|
+
});
|
|
141885
|
+
const mediaId = payload["media_id"];
|
|
141886
|
+
if (typeof mediaId === "string" && mediaId !== "") return mediaId;
|
|
141887
|
+
throw this.#apiError(Number(payload["errcode"] ?? -1), payload["errmsg"]);
|
|
141888
|
+
}
|
|
141889
|
+
/**
|
|
141890
|
+
* 下载一份临时素材(入站图片的 `MediaId`)。成功时企微回原始字节,失败时回 JSON 错误文档,
|
|
141891
|
+
* 所以按 content-type 分流。读到超过 `maxBytes` 就停({@link readBodyLimited})。
|
|
141892
|
+
*/
|
|
141893
|
+
async downloadMedia(input) {
|
|
141894
|
+
const token = await this.getAccessToken(input.signal);
|
|
141895
|
+
const url = new URL("/cgi-bin/media/get", this.apiBaseUrl);
|
|
141896
|
+
url.searchParams.set("access_token", token);
|
|
141897
|
+
url.searchParams.set("media_id", input.mediaId);
|
|
141898
|
+
const response = await this.#fetch(url, {
|
|
141899
|
+
method: "GET",
|
|
141900
|
+
...input.signal === void 0 ? {} : { signal: input.signal }
|
|
141901
|
+
});
|
|
141902
|
+
const contentType = response.headers.get("content-type") ?? "";
|
|
141903
|
+
if (contentType.includes("application/json") || contentType.includes("text/plain")) {
|
|
141904
|
+
let payload = {};
|
|
141905
|
+
try {
|
|
141906
|
+
const parsed = await response.json();
|
|
141907
|
+
if (parsed !== null && typeof parsed === "object" && !Array.isArray(parsed)) {
|
|
141908
|
+
payload = parsed;
|
|
141909
|
+
}
|
|
141910
|
+
} catch {
|
|
141911
|
+
}
|
|
141912
|
+
throw this.#apiError(Number(payload["errcode"] ?? -1), payload["errmsg"]);
|
|
141913
|
+
}
|
|
141914
|
+
if (!response.ok) {
|
|
141915
|
+
await response.body?.cancel().catch(() => void 0);
|
|
141916
|
+
throw new WecomAppApiError(
|
|
141917
|
+
"download-failed",
|
|
141918
|
+
`WeCom media/get failed (HTTP ${String(response.status)}).`
|
|
141919
|
+
);
|
|
141755
141920
|
}
|
|
141921
|
+
const bytes = await readBodyLimited(response, input.maxBytes);
|
|
141922
|
+
const name = filenameFromContentDisposition(response.headers.get("content-disposition"));
|
|
141923
|
+
const mimeType = contentType.split(";")[0]?.trim();
|
|
141924
|
+
return {
|
|
141925
|
+
bytes,
|
|
141926
|
+
name,
|
|
141927
|
+
mimeType: mimeType === void 0 || mimeType === "" ? void 0 : mimeType
|
|
141928
|
+
};
|
|
141756
141929
|
}
|
|
141757
|
-
async #
|
|
141758
|
-
const token = await this.getAccessToken(
|
|
141930
|
+
async #send(message, signal) {
|
|
141931
|
+
const token = await this.getAccessToken(signal);
|
|
141759
141932
|
const url = new URL("/cgi-bin/message/send", this.apiBaseUrl);
|
|
141760
141933
|
url.searchParams.set("access_token", token);
|
|
141761
141934
|
const payload = await this.#requestJson(url, {
|
|
141762
141935
|
method: "POST",
|
|
141763
141936
|
headers: { "content-type": "application/json; charset=utf-8" },
|
|
141764
|
-
body: JSON.stringify({
|
|
141765
|
-
|
|
141766
|
-
msgtype: body.msgtype,
|
|
141767
|
-
agentid: body.agentid,
|
|
141768
|
-
text: body.text
|
|
141769
|
-
}),
|
|
141770
|
-
...body.signal === void 0 ? {} : { signal: body.signal }
|
|
141937
|
+
body: JSON.stringify({ ...message, agentid: Number.parseInt(this.agentId, 10) }),
|
|
141938
|
+
...signal === void 0 ? {} : { signal }
|
|
141771
141939
|
});
|
|
141772
141940
|
const errcode = Number(payload["errcode"] ?? 0);
|
|
141773
|
-
if (errcode
|
|
141941
|
+
if (errcode !== 0) throw this.#apiError(errcode, payload["errmsg"]);
|
|
141942
|
+
const invalid = payload["invaliduser"];
|
|
141943
|
+
if (typeof invalid === "string" && invalid.trim() !== "") {
|
|
141944
|
+
throw new WecomAppApiError("invalid-user", `WeCom did not deliver to: ${invalid.trim()}.`, {
|
|
141945
|
+
providerCode: "81013",
|
|
141946
|
+
hint: "\u786E\u8BA4\u63A5\u6536\u4EBA\u4ECD\u5728\u8FD9\u4E2A\u81EA\u5EFA\u5E94\u7528\u7684\u53EF\u89C1\u8303\u56F4\u5185\u3002"
|
|
141947
|
+
});
|
|
141948
|
+
}
|
|
141949
|
+
}
|
|
141950
|
+
#apiError(errcode, errmsg) {
|
|
141951
|
+
const code2 = String(errcode);
|
|
141952
|
+
const message = typeof errmsg === "string" && errmsg !== "" ? `WeCom API failed (${code2}): ${errmsg}` : `WeCom API failed (${code2}).`;
|
|
141953
|
+
if (errcode === 40014 || errcode === 42001) this.invalidateToken();
|
|
141774
141954
|
if (errcode === 60020) {
|
|
141775
|
-
|
|
141776
|
-
providerCode:
|
|
141955
|
+
return new WecomAppApiError("trusted-ip", "WeCom rejected the outbound IP (errcode 60020).", {
|
|
141956
|
+
providerCode: code2,
|
|
141777
141957
|
hint: "\u628A\u51FA\u7AD9\u516C\u7F51 IP \u52A0\u8FDB\u4F01\u4E1A\u5FAE\u4FE1\u540E\u53F0\u7684\u300C\u4F01\u4E1A\u53EF\u4FE1 IP\u300D\u3002"
|
|
141778
141958
|
});
|
|
141779
141959
|
}
|
|
141780
|
-
if (errcode ===
|
|
141781
|
-
|
|
141960
|
+
if (errcode === 81013) {
|
|
141961
|
+
return new WecomAppApiError("invalid-user", message, {
|
|
141962
|
+
providerCode: code2,
|
|
141963
|
+
hint: "\u6536\u4EF6\u4EBA\u3001\u90E8\u95E8\u6216\u6807\u7B7E\u4E0D\u5B58\u5728\uFF0C\u6216\u4E0D\u5728\u8FD9\u4E2A\u81EA\u5EFA\u5E94\u7528\u7684\u53EF\u89C1\u8303\u56F4\u5185\u3002"
|
|
141964
|
+
});
|
|
141965
|
+
}
|
|
141966
|
+
if (errcode === 40056) {
|
|
141967
|
+
return new WecomAppApiError("invalid-agent", message, {
|
|
141968
|
+
providerCode: code2,
|
|
141969
|
+
hint: "AgentId \u4E0D\u5BF9\uFF0C\u6838\u5BF9\u81EA\u5EFA\u5E94\u7528\u7684 AgentId\u3002"
|
|
141970
|
+
});
|
|
141782
141971
|
}
|
|
141783
|
-
|
|
141784
|
-
"send-failed",
|
|
141785
|
-
typeof payload["errmsg"] === "string" ? payload["errmsg"] : `WeCom message/send failed (${String(errcode)}).`,
|
|
141786
|
-
{ providerCode: String(errcode) }
|
|
141787
|
-
);
|
|
141972
|
+
return new WecomAppApiError("api-failed", message, { providerCode: code2 });
|
|
141788
141973
|
}
|
|
141789
141974
|
async #requestJson(url, init) {
|
|
141790
141975
|
const response = await this.#fetch(url, init);
|
|
@@ -141819,7 +142004,7 @@ var WecomAppCryptoError = class extends Error {
|
|
|
141819
142004
|
this.code = code2;
|
|
141820
142005
|
}
|
|
141821
142006
|
};
|
|
141822
|
-
var isValidEncodingAESKey = (
|
|
142007
|
+
var isValidEncodingAESKey = (value2) => value2.length === 43 && /^[A-Za-z0-9]+$/.test(value2);
|
|
141823
142008
|
var parseEncodingAESKey = (encodingAESKey) => {
|
|
141824
142009
|
const key = Buffer.from(`${encodingAESKey}=`, "base64");
|
|
141825
142010
|
if (key.length !== AES_KEY_BYTES) {
|
|
@@ -141899,7 +142084,7 @@ var createWecomAppCrypto = (input) => {
|
|
|
141899
142084
|
var deriveCallbackPathSecret = (token, encodingAESKey) => NodeCrypto4.createHash("sha256").update(`${token.trim()}:${encodingAESKey.trim()}`).digest("hex").slice(0, 24);
|
|
141900
142085
|
|
|
141901
142086
|
// src/wecomAppParse.ts
|
|
141902
|
-
var isRecord2 = (
|
|
142087
|
+
var isRecord2 = (value2) => value2 !== null && typeof value2 === "object" && !Array.isArray(value2);
|
|
141903
142088
|
var isXmlFormat = (raw) => {
|
|
141904
142089
|
const trimmed = raw.trim();
|
|
141905
142090
|
return trimmed.startsWith("<") && trimmed.endsWith(">");
|
|
@@ -142216,6 +142401,69 @@ var makeWecomAppCallbackHub = () => {
|
|
|
142216
142401
|
return { acquire };
|
|
142217
142402
|
};
|
|
142218
142403
|
|
|
142404
|
+
// src/wecomAppConfig.ts
|
|
142405
|
+
var value = (bot, key) => readString(bot.values, key);
|
|
142406
|
+
var wecomAppCredentials = (bot) => ({
|
|
142407
|
+
corpId: value(bot, "wecomAppCorpId"),
|
|
142408
|
+
agentId: value(bot, "wecomAppAgentId"),
|
|
142409
|
+
corpSecret: value(bot, "wecomAppSecret"),
|
|
142410
|
+
token: value(bot, "wecomAppToken"),
|
|
142411
|
+
encodingAESKey: value(bot, "wecomAppEncodingAESKey"),
|
|
142412
|
+
callbackBaseUrl: value(bot, "wecomAppCallbackBaseUrl").replace(/\/+$/u, ""),
|
|
142413
|
+
apiBaseUrl: value(bot, "wecomAppApiBaseUrl"),
|
|
142414
|
+
listenPortRaw: value(bot, "wecomAppListenPort")
|
|
142415
|
+
});
|
|
142416
|
+
var validCorpId = (id) => /^[A-Za-z][A-Za-z0-9_-]{2,127}$/u.test(id);
|
|
142417
|
+
var validAgentId = (id) => /^\d{1,32}$/u.test(id) && Number(id) > 0;
|
|
142418
|
+
var parseListenPort = (raw) => {
|
|
142419
|
+
if (raw === "") return WECOM_APP_DEFAULT_CALLBACK_PORT;
|
|
142420
|
+
if (!/^\d{1,5}$/u.test(raw)) return null;
|
|
142421
|
+
const port = Number(raw);
|
|
142422
|
+
return port <= 65535 ? port : null;
|
|
142423
|
+
};
|
|
142424
|
+
var REQUIRED = [
|
|
142425
|
+
["wecomAppCorpId", "corpId"],
|
|
142426
|
+
["wecomAppAgentId", "agentId"],
|
|
142427
|
+
["wecomAppSecret", "corpSecret"],
|
|
142428
|
+
["wecomAppToken", "token"],
|
|
142429
|
+
["wecomAppEncodingAESKey", "encodingAESKey"]
|
|
142430
|
+
];
|
|
142431
|
+
var validateWecomAppBot = (bot) => {
|
|
142432
|
+
const c = wecomAppCredentials(bot);
|
|
142433
|
+
const issues = [];
|
|
142434
|
+
for (const [column, field] of REQUIRED) {
|
|
142435
|
+
if (c[field] === "") issues.push({ column, code: "required" });
|
|
142436
|
+
}
|
|
142437
|
+
if (c.corpId !== "" && !validCorpId(c.corpId)) {
|
|
142438
|
+
issues.push({ column: "wecomAppCorpId", code: "format" });
|
|
142439
|
+
}
|
|
142440
|
+
if (c.agentId !== "" && !validAgentId(c.agentId)) {
|
|
142441
|
+
issues.push({ column: "wecomAppAgentId", code: "format" });
|
|
142442
|
+
}
|
|
142443
|
+
if (c.encodingAESKey !== "" && !isValidEncodingAESKey(c.encodingAESKey)) {
|
|
142444
|
+
issues.push({ column: "wecomAppEncodingAESKey", code: "format" });
|
|
142445
|
+
}
|
|
142446
|
+
for (const [column, raw] of [
|
|
142447
|
+
["wecomAppCallbackBaseUrl", c.callbackBaseUrl],
|
|
142448
|
+
["wecomAppApiBaseUrl", c.apiBaseUrl]
|
|
142449
|
+
]) {
|
|
142450
|
+
if (raw !== "" && !isHttpUrl(raw)) {
|
|
142451
|
+
issues.push({ column, code: "format" });
|
|
142452
|
+
}
|
|
142453
|
+
}
|
|
142454
|
+
if (parseListenPort(c.listenPortRaw) === null) {
|
|
142455
|
+
issues.push({ column: "wecomAppListenPort", code: "format" });
|
|
142456
|
+
}
|
|
142457
|
+
return issues;
|
|
142458
|
+
};
|
|
142459
|
+
var readWecomAppConnectConfig = (bot) => {
|
|
142460
|
+
const issues = validateWecomAppBot(bot);
|
|
142461
|
+
const credentials3 = wecomAppCredentials(bot);
|
|
142462
|
+
const listenPort = parseListenPort(credentials3.listenPortRaw);
|
|
142463
|
+
if (issues.length > 0 || listenPort === null) return { ok: false, issues };
|
|
142464
|
+
return { ok: true, credentials: credentials3, listenPort };
|
|
142465
|
+
};
|
|
142466
|
+
|
|
142219
142467
|
// src/wecomAppAdapter.ts
|
|
142220
142468
|
var COLUMNS5 = [
|
|
142221
142469
|
{
|
|
@@ -142260,22 +142508,16 @@ var COLUMNS5 = [
|
|
|
142260
142508
|
placeholderKey: "column.wecomAppListenPort.placeholder"
|
|
142261
142509
|
}
|
|
142262
142510
|
];
|
|
142263
|
-
var
|
|
142264
|
-
|
|
142265
|
-
|
|
142266
|
-
|
|
142267
|
-
|
|
142268
|
-
|
|
142269
|
-
|
|
142270
|
-
|
|
142271
|
-
|
|
142272
|
-
|
|
142273
|
-
var parseListenPort = (raw) => {
|
|
142274
|
-
if (raw === "") return WECOM_APP_DEFAULT_CALLBACK_PORT;
|
|
142275
|
-
const n = Number.parseInt(raw, 10);
|
|
142276
|
-
if (!Number.isInteger(n) || n < 0 || n > 65535) return WECOM_APP_DEFAULT_CALLBACK_PORT;
|
|
142277
|
-
return n;
|
|
142278
|
-
};
|
|
142511
|
+
var WECOM_APP_IMAGE_BYTES = 10 * 1024 * 1024;
|
|
142512
|
+
var WECOM_APP_FILE_BYTES = 20 * 1024 * 1024;
|
|
142513
|
+
var WECOM_APP_MIN_BYTES = 5;
|
|
142514
|
+
var WECOM_APP_IMAGE_TYPES = /* @__PURE__ */ new Set(["image/jpeg", "image/png"]);
|
|
142515
|
+
var OUTBOUND_COLUMNS = /* @__PURE__ */ new Set([
|
|
142516
|
+
"wecomAppCorpId",
|
|
142517
|
+
"wecomAppAgentId",
|
|
142518
|
+
"wecomAppSecret",
|
|
142519
|
+
"wecomAppApiBaseUrl"
|
|
142520
|
+
]);
|
|
142279
142521
|
var makeWecomAppAdapter = (deps) => {
|
|
142280
142522
|
const apis = /* @__PURE__ */ new Map();
|
|
142281
142523
|
const newApi = (c) => new WecomAppApi({
|
|
@@ -142286,43 +142528,49 @@ var makeWecomAppAdapter = (deps) => {
|
|
|
142286
142528
|
fetch: deps.fetch
|
|
142287
142529
|
});
|
|
142288
142530
|
const callbackHub = makeWecomAppCallbackHub();
|
|
142289
|
-
const
|
|
142531
|
+
const apiFor = (binding) => {
|
|
142532
|
+
const api = apis.get(binding.rowId);
|
|
142533
|
+
if (api === void 0) {
|
|
142534
|
+
throw new ImNotConnectedError(`wecom-app bot '${binding.displayName}' is not connected.`);
|
|
142535
|
+
}
|
|
142536
|
+
return api;
|
|
142537
|
+
};
|
|
142538
|
+
const sendMedia = async (binding, mediaType, file) => {
|
|
142539
|
+
const api = apiFor(binding);
|
|
142540
|
+
const mediaId = await api.uploadMedia({ mediaType, ...file });
|
|
142541
|
+
await api.sendMedia({ userId: binding.chatId, mediaType, mediaId });
|
|
142542
|
+
deps.log.info(`wecom-app delivered ${mediaType === "image" ? "an image" : "a file"}`, {
|
|
142543
|
+
name: file.name
|
|
142544
|
+
});
|
|
142545
|
+
};
|
|
142546
|
+
const toInbound = (message, handlers, botName) => {
|
|
142290
142547
|
if (message.msgtype === "event") return;
|
|
142291
|
-
|
|
142292
|
-
|
|
142548
|
+
if (message.chatid !== void 0 && message.chatid !== "") {
|
|
142549
|
+
deps.log.info("wecom-app ignored a group message; only direct messages are supported", {
|
|
142550
|
+
bot: botName
|
|
142551
|
+
});
|
|
142552
|
+
return;
|
|
142553
|
+
}
|
|
142554
|
+
const chatId = message.from?.userid ?? "";
|
|
142293
142555
|
if (chatId === "") return;
|
|
142556
|
+
const messageId = message.msgid ?? `${chatId}:${message.createTime ?? Date.now()}`;
|
|
142557
|
+
const base2 = { messageId, chatId, senderId: chatId };
|
|
142294
142558
|
if (message.msgtype === "text") {
|
|
142295
|
-
handlers.onMessage({
|
|
142296
|
-
messageId: message.msgid ?? `${chatId}:${message.createTime ?? Date.now()}`,
|
|
142297
|
-
chatId,
|
|
142298
|
-
senderId,
|
|
142299
|
-
text: message.text?.content?.trim() ?? "",
|
|
142300
|
-
resources: []
|
|
142301
|
-
});
|
|
142559
|
+
handlers.onMessage({ ...base2, text: message.text?.content?.trim() ?? "", resources: [] });
|
|
142302
142560
|
return;
|
|
142303
142561
|
}
|
|
142304
|
-
if (message.msgtype === "image") {
|
|
142562
|
+
if (message.msgtype === "image" && message.mediaId !== void 0 && message.mediaId !== "") {
|
|
142305
142563
|
handlers.onMessage({
|
|
142306
|
-
|
|
142307
|
-
chatId,
|
|
142308
|
-
senderId,
|
|
142564
|
+
...base2,
|
|
142309
142565
|
text: "",
|
|
142310
|
-
resources:
|
|
142311
|
-
{
|
|
142312
|
-
|
|
142313
|
-
name: "image.jpg",
|
|
142314
|
-
mimeType: "image/jpeg",
|
|
142315
|
-
kind: "image"
|
|
142316
|
-
}
|
|
142317
|
-
] : [],
|
|
142318
|
-
...message.mediaId ? {} : { unsupportedType: "image" }
|
|
142566
|
+
resources: [
|
|
142567
|
+
{ key: message.mediaId, name: "image.jpg", mimeType: "image/jpeg", kind: "image" }
|
|
142568
|
+
]
|
|
142319
142569
|
});
|
|
142320
142570
|
return;
|
|
142321
142571
|
}
|
|
142322
142572
|
handlers.onMessage({
|
|
142323
|
-
|
|
142324
|
-
chatId,
|
|
142325
|
-
senderId,
|
|
142573
|
+
...base2,
|
|
142326
142574
|
text: "",
|
|
142327
142575
|
resources: [],
|
|
142328
142576
|
unsupportedType: message.msgtype || "unknown"
|
|
@@ -142333,25 +142581,35 @@ var makeWecomAppAdapter = (deps) => {
|
|
|
142333
142581
|
icon: "wecom",
|
|
142334
142582
|
label: deps.translate("platform.wecom-app"),
|
|
142335
142583
|
columns: COLUMNS5,
|
|
142336
|
-
|
|
142337
|
-
|
|
142338
|
-
|
|
142339
|
-
|
|
142584
|
+
// 必填的都填了、EncodingAESKey 格式对(解不了回调的行不算配好)。别的列格式不对的行照样交给
|
|
142585
|
+
// connect,由它报出哪几列不对(一条日志,不重试),也不挡设置页的「检查连接」去探出站凭据。
|
|
142586
|
+
isConfigured: (bot) => validateWecomAppBot(bot).every(
|
|
142587
|
+
(issue) => issue.code !== "required" && issue.column !== "wecomAppEncodingAESKey"
|
|
142588
|
+
),
|
|
142340
142589
|
/**
|
|
142341
142590
|
* 自建应用是回调式渠道:入站由企微推到我们的 listener,没有可探的长连接;能探的是出站
|
|
142342
142591
|
* 凭据——和真实发送同一条路,向 gettoken 换一次 access_token。
|
|
142343
142592
|
*/
|
|
142344
142593
|
checkConnection: async (bot) => {
|
|
142345
|
-
const
|
|
142346
|
-
|
|
142594
|
+
const outbound = validateWecomAppBot(bot).filter(
|
|
142595
|
+
(issue) => OUTBOUND_COLUMNS.has(issue.column)
|
|
142596
|
+
);
|
|
142597
|
+
if (outbound.some((issue) => issue.code === "required")) {
|
|
142347
142598
|
return {
|
|
142348
142599
|
stage: "credentials",
|
|
142349
142600
|
ok: false,
|
|
142350
142601
|
detail: "missing corp id, agent id or secret in saved config"
|
|
142351
142602
|
};
|
|
142352
142603
|
}
|
|
142604
|
+
if (outbound.length > 0) {
|
|
142605
|
+
return {
|
|
142606
|
+
stage: "credentials",
|
|
142607
|
+
ok: false,
|
|
142608
|
+
detail: `malformed ${outbound.map((issue) => issue.column).join(", ")} in saved config`
|
|
142609
|
+
};
|
|
142610
|
+
}
|
|
142353
142611
|
try {
|
|
142354
|
-
await newApi(
|
|
142612
|
+
await newApi(wecomAppCredentials(bot)).getAccessToken();
|
|
142355
142613
|
return {
|
|
142356
142614
|
stage: "gettoken",
|
|
142357
142615
|
ok: true,
|
|
@@ -142362,9 +142620,14 @@ var makeWecomAppAdapter = (deps) => {
|
|
|
142362
142620
|
}
|
|
142363
142621
|
},
|
|
142364
142622
|
connect: async (bot, handlers) => {
|
|
142365
|
-
const
|
|
142366
|
-
|
|
142367
|
-
|
|
142623
|
+
const config2 = readWecomAppConnectConfig(bot);
|
|
142624
|
+
if (!config2.ok) {
|
|
142625
|
+
throw new Error(
|
|
142626
|
+
`wecom-app config has problems: ${config2.issues.map((issue) => `${issue.column} (${issue.code})`).join(", ")}`
|
|
142627
|
+
);
|
|
142628
|
+
}
|
|
142629
|
+
const c = config2.credentials;
|
|
142630
|
+
const lease = await callbackHub.acquire({ port: config2.listenPort });
|
|
142368
142631
|
const server = lease.server;
|
|
142369
142632
|
const api = newApi(c);
|
|
142370
142633
|
apis.set(bot.rowId, api);
|
|
@@ -142376,17 +142639,17 @@ var makeWecomAppAdapter = (deps) => {
|
|
|
142376
142639
|
encodingAESKey: c.encodingAESKey,
|
|
142377
142640
|
corpId: c.corpId,
|
|
142378
142641
|
log: deps.log,
|
|
142379
|
-
onInbound: (message) => toInbound(message, handlers)
|
|
142642
|
+
onInbound: (message) => toInbound(message, handlers, bot.displayName)
|
|
142380
142643
|
});
|
|
142381
142644
|
} catch (error) {
|
|
142645
|
+
apis.delete(bot.rowId);
|
|
142382
142646
|
await lease.release();
|
|
142383
142647
|
throw error;
|
|
142384
142648
|
}
|
|
142385
|
-
const fullUrl = c.callbackBaseUrl !== "" ? `${c.callbackBaseUrl}${path}` : `${server.origin}${path}`;
|
|
142386
142649
|
deps.log.info("wecom-app connected", {
|
|
142387
142650
|
bot: bot.displayName,
|
|
142388
142651
|
callbackPath: path,
|
|
142389
|
-
callbackUrl:
|
|
142652
|
+
callbackUrl: c.callbackBaseUrl !== "" ? `${c.callbackBaseUrl}${path}` : `${server.origin}${path}`,
|
|
142390
142653
|
listen: `${server.host}:${String(server.port)}`
|
|
142391
142654
|
});
|
|
142392
142655
|
return {
|
|
@@ -142406,12 +142669,17 @@ var makeWecomAppAdapter = (deps) => {
|
|
|
142406
142669
|
if (options?.targetKind === "group") {
|
|
142407
142670
|
throw new Error("wecom-app can only deliver to a user; group targets are not supported.");
|
|
142408
142671
|
}
|
|
142409
|
-
|
|
142410
|
-
|
|
142411
|
-
|
|
142412
|
-
|
|
142413
|
-
|
|
142672
|
+
await apiFor(binding).sendText({ userId: binding.chatId, content: text3 });
|
|
142673
|
+
},
|
|
142674
|
+
sendImage: (binding, image2) => sendMedia(binding, "image", image2),
|
|
142675
|
+
sendFile: (binding, file) => sendMedia(binding, "file", file),
|
|
142676
|
+
outboundLimits: {
|
|
142677
|
+
imageBytes: WECOM_APP_IMAGE_BYTES,
|
|
142678
|
+
fileBytes: WECOM_APP_FILE_BYTES,
|
|
142679
|
+
minBytes: WECOM_APP_MIN_BYTES
|
|
142414
142680
|
},
|
|
142681
|
+
imageMimeTypes: WECOM_APP_IMAGE_TYPES,
|
|
142682
|
+
fetchResource: (binding, input) => apiFor(binding).downloadMedia({ mediaId: input.resource.key, maxBytes: input.maxBytes }),
|
|
142415
142683
|
askApproval: async (binding, request) => {
|
|
142416
142684
|
const api = apis.get(binding.rowId);
|
|
142417
142685
|
if (api === void 0) return null;
|
|
@@ -142436,7 +142704,7 @@ var imPlugin = definePlugin({
|
|
|
142436
142704
|
const cached = await ctx.cache.getJson(key, maxAgeMs);
|
|
142437
142705
|
return cached === null || cached.stale ? null : cached.value;
|
|
142438
142706
|
},
|
|
142439
|
-
cacheSet: (key,
|
|
142707
|
+
cacheSet: (key, value2) => ctx.cache.setJson(key, value2),
|
|
142440
142708
|
log: {
|
|
142441
142709
|
info: (message, fields) => ctx.log.info(message, fields),
|
|
142442
142710
|
warn: (message, fields) => ctx.log.warn(message, fields)
|
|
@@ -142502,11 +142770,13 @@ var imPlugin = definePlugin({
|
|
|
142502
142770
|
adapters
|
|
142503
142771
|
});
|
|
142504
142772
|
const acknowledgements = makeAcknowledgements(core);
|
|
142505
|
-
const
|
|
142773
|
+
const failures = makeFailureNotices(core);
|
|
142774
|
+
const replyCards = makeReplyCards(core, failures);
|
|
142506
142775
|
const teams = makeTeamRuns(core, { clearWorking: acknowledgements.clearWorking });
|
|
142507
142776
|
const notifications = makeNotifications(core, {
|
|
142508
142777
|
clearWorking: acknowledgements.clearWorking,
|
|
142509
|
-
replyCards
|
|
142778
|
+
replyCards,
|
|
142779
|
+
failures
|
|
142510
142780
|
});
|
|
142511
142781
|
const webSync = makeWebSync(core);
|
|
142512
142782
|
const approvals = makeApprovals(core);
|