@qwen-code/qwen-code 0.17.0-preview.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/features/approval-mode.md +26 -22
- package/bundled/qc-helper/docs/features/commands.md +12 -10
- package/bundled/qc-helper/docs/features/status-line.md +161 -27
- package/chunks/{agent-Z7O3I6MY.js → agent-ZJHHICAC.js} +10 -10
- package/chunks/{anthropicContentGenerator-UCGOKLGC.js → anthropicContentGenerator-M45RXZVS.js} +3 -3
- package/chunks/{askUserQuestion-DC6OWQIL.js → askUserQuestion-TGRD7FNQ.js} +1 -1
- package/chunks/{ca-NMZFEGAU.js → ca-6RSCDYUS.js} +2 -1
- package/chunks/{chunk-7JHNICSJ.js → chunk-2KEXT6RB.js} +643 -136
- package/chunks/{chunk-J5VCSWPA.js → chunk-3PJXIDKI.js} +1153 -103
- package/chunks/{chunk-BF5WTWOH.js → chunk-5JBZM7FZ.js} +3 -3
- package/chunks/{chunk-FEENTAB2.js → chunk-6O244QKR.js} +1 -1
- package/chunks/chunk-7TQVELRB.js +10412 -0
- package/chunks/{chunk-HCSJIOLR.js → chunk-BNESGOSJ.js} +7450 -3516
- package/chunks/{chunk-OXXOAIGT.js → chunk-C5CUHYSM.js} +333 -1162
- package/chunks/{chunk-V7LMZR76.js → chunk-JBSYXHJF.js} +1 -1
- package/chunks/{chunk-R2B65CAN.js → chunk-JKUAX6UT.js} +0 -1
- package/chunks/{chunk-4Q4IDQE5.js → chunk-NJJER6E2.js} +4 -4
- package/chunks/{chunk-ZWH2TVVN.js → chunk-PLYRQYKC.js} +10 -10
- package/chunks/{chunk-U2K6HDUJ.js → chunk-QVJ33ZBG.js} +23 -13
- package/chunks/{chunk-HAQCNXSG.js → chunk-RQW7WUJR.js} +15 -0
- package/chunks/{chunk-UQRYJQBE.js → chunk-SOGUPKP6.js} +1 -1
- package/chunks/{chunk-MJCO2CPA.js → chunk-X2474BTT.js} +45 -6
- package/chunks/{computer-use-2J5ZXEER.js → computer-use-NAHQPV2L.js} +24 -6
- package/chunks/{contextCommand-FU55EUOH.js → contextCommand-7KJT3UJS.js} +12 -12
- package/chunks/{cron-create-FXRORK2U.js → cron-create-V3UK2SJN.js} +1 -1
- package/chunks/{cron-delete-D24IN6CA.js → cron-delete-MANALPCP.js} +1 -1
- package/chunks/{cron-list-SMOX26SL.js → cron-list-UDIYK3B3.js} +1 -1
- package/chunks/{de-OIMT3OMI.js → de-APURNJ3I.js} +2 -1
- package/chunks/{dist-GRQVFL3G.js → dist-ATAKC63R.js} +1 -1
- package/chunks/{edit-UQFK25NR.js → edit-JWXCQ4KK.js} +10 -10
- package/chunks/{en-2IFZ5THF.js → en-FYO57HJW.js} +3 -1
- package/chunks/{enter-worktree-VZT6JX45.js → enter-worktree-G4CJXPT4.js} +10 -10
- package/chunks/{exit-worktree-JETQQ26R.js → exit-worktree-MYZ2FGU2.js} +10 -10
- package/chunks/{exitPlanMode-SFNBASAU.js → exitPlanMode-ELJ6FSMU.js} +10 -10
- package/chunks/{fr-PVELSHTV.js → fr-32YHQZIS.js} +2 -1
- package/chunks/{geminiContentGenerator-XWUW7B7J.js → geminiContentGenerator-3LR7MKCQ.js} +2 -2
- package/chunks/{glob-34CPYA2M.js → glob-CANUAUTC.js} +10 -10
- package/chunks/{grep-4RXPZUYZ.js → grep-WZWNJRDX.js} +10 -10
- package/chunks/{ja-P5TK5GNN.js → ja-PEUXN4XT.js} +2 -1
- package/chunks/{ls-7FYQHPWF.js → ls-T4SVZWR6.js} +1 -1
- package/chunks/{lsp-DKG34USR.js → lsp-U4ZQLNIS.js} +1 -1
- package/chunks/{monitor-QCNAUO75.js → monitor-CCKNOUFG.js} +10 -10
- package/chunks/{multipart-parser-IXGBIOIN.js → multipart-parser-AJ4WASWR.js} +2 -2
- package/chunks/{notebook-edit-I2MBTWI6.js → notebook-edit-XDUY5Q4I.js} +10 -10
- package/chunks/{openaiContentGenerator-VNQUJIG5.js → openaiContentGenerator-N3O3MYIT.js} +8 -8
- package/chunks/{pt-A5GHG66T.js → pt-2INS7YVC.js} +2 -1
- package/chunks/{qwenContentGenerator-LICFK2K7.js → qwenContentGenerator-DEOIWKVH.js} +12 -12
- package/chunks/{read-file-N2YTOQ2U.js → read-file-BRNXGILN.js} +5 -5
- package/chunks/{ripGrep-NBWBOVPW.js → ripGrep-ZRY5PKUZ.js} +10 -10
- package/chunks/{ru-66XKB4QX.js → ru-6CQ5HNHB.js} +2 -1
- package/chunks/{scheduler-XHHMN7TA.js → scheduler-SSFABMN5.js} +10 -10
- package/chunks/{send-message-ZL7CDM7K.js → send-message-GFYV7WLL.js} +1 -1
- package/chunks/{serve-HESJL2FH.js → serve-B5O72CRN.js} +12 -12
- package/chunks/{shell-V7PVS7O7.js → shell-SGYNBVMK.js} +10 -10
- package/chunks/{skill-6LP5ANRL.js → skill-V7Y6DOFB.js} +6 -6
- package/chunks/{src-TMOD5X6F.js → src-7XL4G4DC.js} +88 -46
- package/chunks/{src-4TLZBCTV.js → src-OKFFQGXB.js} +14 -12
- package/chunks/{syntheticOutput-U3YJ3GOO.js → syntheticOutput-DM43O6TY.js} +2 -2
- package/chunks/{task-stop-NPUI3YBA.js → task-stop-WKP5OB3V.js} +1 -1
- package/chunks/{todoWrite-USWGQJ53.js → todoWrite-GHL6DCLP.js} +8 -2
- package/chunks/{tool-search-6CRPUSUB.js → tool-search-7MHT3HGM.js} +5 -5
- package/chunks/{web-fetch-LGLGFGGT.js → web-fetch-SZIV74ZX.js} +2 -2
- package/chunks/{write-file-CCMVL5Q7.js → write-file-ARS2Z6BJ.js} +12 -12
- package/chunks/{zh-TW-3ND6DQRX.js → zh-TW-SSL3ATVZ.js} +3 -1
- package/chunks/{zh-OB5P2ZDO.js → zh-ZHZCMIRG.js} +3 -1
- package/cli.js +32976 -50717
- package/locales/ca.js +2 -1
- package/locales/de.js +2 -1
- package/locales/en.js +4 -1
- package/locales/fr.js +2 -1
- package/locales/ja.js +2 -1
- package/locales/pt.js +2 -1
- package/locales/ru.js +2 -1
- package/locales/zh-TW.js +4 -1
- package/locales/zh.js +4 -1
- package/package.json +2 -2
- package/chunks/chunk-EM6ETG2K.js +0 -60
- package/chunks/chunk-TI4GXJKO.js +0 -4277
- package/chunks/multipart-parser-3QWGTLK3.js +0 -384
- package/chunks/src-IPWIHNMI.js +0 -1406
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
import {
|
|
4
4
|
require_aspromise,
|
|
5
5
|
require_index_minimal,
|
|
6
|
-
require_inquire,
|
|
7
6
|
require_minimal,
|
|
8
7
|
require_minimal2,
|
|
9
8
|
require_reader,
|
|
10
9
|
require_roots,
|
|
11
10
|
require_rpc,
|
|
11
|
+
require_umd,
|
|
12
12
|
require_writer
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3PJXIDKI.js";
|
|
14
14
|
import {
|
|
15
15
|
require_hasown
|
|
16
16
|
} from "./chunk-UWCTAVOD.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-OJFMTECH.js";
|
|
30
30
|
import {
|
|
31
31
|
STRUCTURED_OUTPUT_REDACTED_ARGS
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-SOGUPKP6.js";
|
|
33
33
|
import {
|
|
34
34
|
ToolDisplayNames,
|
|
35
35
|
ToolNames
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
BaseDeclarativeTool,
|
|
39
39
|
BaseToolInvocation
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-JKUAX6UT.js";
|
|
41
41
|
import {
|
|
42
42
|
DEFAULT_OPENAI_BASE_URL,
|
|
43
43
|
convertSchema,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
import {
|
|
50
50
|
FinishReason,
|
|
51
51
|
GenerateContentResponse
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-BNESGOSJ.js";
|
|
53
53
|
import {
|
|
54
54
|
FatalConfigError,
|
|
55
55
|
Storage,
|
|
@@ -19972,6 +19972,7 @@ var require_codegen = __commonJS({
|
|
|
19972
19972
|
"use strict";
|
|
19973
19973
|
init_esbuild_shims();
|
|
19974
19974
|
module.exports = codegen;
|
|
19975
|
+
var reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;
|
|
19975
19976
|
function codegen(functionParams, functionName) {
|
|
19976
19977
|
if (typeof functionParams === "string") {
|
|
19977
19978
|
functionName = functionParams;
|
|
@@ -20021,7 +20022,7 @@ var require_codegen = __commonJS({
|
|
|
20021
20022
|
}
|
|
20022
20023
|
__name(Codegen, "Codegen");
|
|
20023
20024
|
function toString(functionNameOverride) {
|
|
20024
|
-
return "function " + (functionNameOverride || functionName
|
|
20025
|
+
return "function " + safeFunctionName(functionNameOverride || functionName) + "(" + (functionParams && functionParams.join(",") || "") + "){\n " + body.join("\n ") + "\n}";
|
|
20025
20026
|
}
|
|
20026
20027
|
__name(toString, "toString");
|
|
20027
20028
|
Codegen.toString = toString;
|
|
@@ -20029,6 +20030,36 @@ var require_codegen = __commonJS({
|
|
|
20029
20030
|
}
|
|
20030
20031
|
__name(codegen, "codegen");
|
|
20031
20032
|
codegen.verbose = false;
|
|
20033
|
+
function safeFunctionName(name) {
|
|
20034
|
+
if (!name)
|
|
20035
|
+
return "";
|
|
20036
|
+
name = String(name).replace(/[^\w$]/g, "");
|
|
20037
|
+
if (!name)
|
|
20038
|
+
return "";
|
|
20039
|
+
if (/^\d/.test(name))
|
|
20040
|
+
name = "_" + name;
|
|
20041
|
+
return reservedRe.test(name) ? name + "_" : name;
|
|
20042
|
+
}
|
|
20043
|
+
__name(safeFunctionName, "safeFunctionName");
|
|
20044
|
+
}
|
|
20045
|
+
});
|
|
20046
|
+
|
|
20047
|
+
// node_modules/@protobufjs/fetch/util/fs.js
|
|
20048
|
+
var require_fs = __commonJS({
|
|
20049
|
+
"node_modules/@protobufjs/fetch/util/fs.js"(exports, module) {
|
|
20050
|
+
"use strict";
|
|
20051
|
+
init_esbuild_shims();
|
|
20052
|
+
var fs8 = null;
|
|
20053
|
+
try {
|
|
20054
|
+
fs8 = __require(
|
|
20055
|
+
/* webpackIgnore: true */
|
|
20056
|
+
"fs"
|
|
20057
|
+
);
|
|
20058
|
+
if (!fs8 || !fs8.readFile || !fs8.readFileSync)
|
|
20059
|
+
fs8 = null;
|
|
20060
|
+
} catch (e) {
|
|
20061
|
+
}
|
|
20062
|
+
module.exports = fs8;
|
|
20032
20063
|
}
|
|
20033
20064
|
});
|
|
20034
20065
|
|
|
@@ -20039,8 +20070,7 @@ var require_fetch = __commonJS({
|
|
|
20039
20070
|
init_esbuild_shims();
|
|
20040
20071
|
module.exports = fetch;
|
|
20041
20072
|
var asPromise = require_aspromise();
|
|
20042
|
-
var
|
|
20043
|
-
var fs8 = inquire("fs");
|
|
20073
|
+
var fs8 = require_fs();
|
|
20044
20074
|
function fetch(filename, options, callback) {
|
|
20045
20075
|
if (typeof options === "function") {
|
|
20046
20076
|
callback = options;
|
|
@@ -20140,6 +20170,37 @@ var require_path = __commonJS({
|
|
|
20140
20170
|
}
|
|
20141
20171
|
});
|
|
20142
20172
|
|
|
20173
|
+
// node_modules/protobufjs/src/util/patterns.js
|
|
20174
|
+
var require_patterns = __commonJS({
|
|
20175
|
+
"node_modules/protobufjs/src/util/patterns.js"(exports) {
|
|
20176
|
+
"use strict";
|
|
20177
|
+
init_esbuild_shims();
|
|
20178
|
+
var patterns = exports;
|
|
20179
|
+
patterns.numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;
|
|
20180
|
+
patterns.typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;
|
|
20181
|
+
patterns.reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;
|
|
20182
|
+
}
|
|
20183
|
+
});
|
|
20184
|
+
|
|
20185
|
+
// node_modules/protobufjs/src/util/fs.js
|
|
20186
|
+
var require_fs2 = __commonJS({
|
|
20187
|
+
"node_modules/protobufjs/src/util/fs.js"(exports, module) {
|
|
20188
|
+
"use strict";
|
|
20189
|
+
init_esbuild_shims();
|
|
20190
|
+
var fs8 = null;
|
|
20191
|
+
try {
|
|
20192
|
+
fs8 = __require(
|
|
20193
|
+
/* webpackIgnore: true */
|
|
20194
|
+
"fs"
|
|
20195
|
+
);
|
|
20196
|
+
if (!fs8 || !fs8.readFile || !fs8.readFileSync)
|
|
20197
|
+
fs8 = null;
|
|
20198
|
+
} catch (e) {
|
|
20199
|
+
}
|
|
20200
|
+
module.exports = fs8;
|
|
20201
|
+
}
|
|
20202
|
+
});
|
|
20203
|
+
|
|
20143
20204
|
// node_modules/protobufjs/src/namespace.js
|
|
20144
20205
|
var require_namespace = __commonJS({
|
|
20145
20206
|
"node_modules/protobufjs/src/namespace.js"(exports, module) {
|
|
@@ -20154,8 +20215,9 @@ var require_namespace = __commonJS({
|
|
|
20154
20215
|
var Type;
|
|
20155
20216
|
var Service;
|
|
20156
20217
|
var Enum;
|
|
20157
|
-
Namespace.fromJSON = /* @__PURE__ */ __name(function fromJSON(name, json) {
|
|
20158
|
-
|
|
20218
|
+
Namespace.fromJSON = /* @__PURE__ */ __name(function fromJSON(name, json, depth) {
|
|
20219
|
+
depth = util.checkDepth(depth);
|
|
20220
|
+
return new Namespace(name, json.options).addJSON(json.nested, depth);
|
|
20159
20221
|
}, "fromJSON");
|
|
20160
20222
|
function arrayToJSON(array, toJSONOptions) {
|
|
20161
20223
|
if (!(array && array.length))
|
|
@@ -20187,17 +20249,17 @@ var require_namespace = __commonJS({
|
|
|
20187
20249
|
ReflectionObject.call(this, name, options);
|
|
20188
20250
|
this.nested = void 0;
|
|
20189
20251
|
this._nestedArray = null;
|
|
20190
|
-
this._lookupCache =
|
|
20252
|
+
this._lookupCache = /* @__PURE__ */ Object.create(null);
|
|
20191
20253
|
this._needsRecursiveFeatureResolution = true;
|
|
20192
20254
|
this._needsRecursiveResolve = true;
|
|
20193
20255
|
}
|
|
20194
20256
|
__name(Namespace, "Namespace");
|
|
20195
20257
|
function clearCache(namespace) {
|
|
20196
20258
|
namespace._nestedArray = null;
|
|
20197
|
-
namespace._lookupCache =
|
|
20259
|
+
namespace._lookupCache = /* @__PURE__ */ Object.create(null);
|
|
20198
20260
|
var parent = namespace;
|
|
20199
20261
|
while (parent = parent.parent) {
|
|
20200
|
-
parent._lookupCache =
|
|
20262
|
+
parent._lookupCache = /* @__PURE__ */ Object.create(null);
|
|
20201
20263
|
}
|
|
20202
20264
|
return namespace;
|
|
20203
20265
|
}
|
|
@@ -20215,30 +20277,33 @@ var require_namespace = __commonJS({
|
|
|
20215
20277
|
arrayToJSON(this.nestedArray, toJSONOptions)
|
|
20216
20278
|
]);
|
|
20217
20279
|
}, "toJSON");
|
|
20218
|
-
Namespace.prototype.addJSON = /* @__PURE__ */ __name(function addJSON(nestedJson) {
|
|
20280
|
+
Namespace.prototype.addJSON = /* @__PURE__ */ __name(function addJSON(nestedJson, depth) {
|
|
20281
|
+
depth = util.checkDepth(depth);
|
|
20219
20282
|
var ns = this;
|
|
20220
20283
|
if (nestedJson) {
|
|
20221
20284
|
for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {
|
|
20222
20285
|
nested = nestedJson[names[i]];
|
|
20223
20286
|
ns.add(
|
|
20224
20287
|
// most to least likely
|
|
20225
|
-
(nested.fields !== void 0 ? Type.fromJSON : nested.values !== void 0 ? Enum.fromJSON : nested.methods !== void 0 ? Service.fromJSON : nested.id !== void 0 ? Field.fromJSON : Namespace.fromJSON)(names[i], nested)
|
|
20288
|
+
(nested.fields !== void 0 ? Type.fromJSON : nested.values !== void 0 ? Enum.fromJSON : nested.methods !== void 0 ? Service.fromJSON : nested.id !== void 0 ? Field.fromJSON : Namespace.fromJSON)(names[i], nested, depth + 1)
|
|
20226
20289
|
);
|
|
20227
20290
|
}
|
|
20228
20291
|
}
|
|
20229
20292
|
return this;
|
|
20230
20293
|
}, "addJSON");
|
|
20231
20294
|
Namespace.prototype.get = /* @__PURE__ */ __name(function get(name) {
|
|
20232
|
-
return this.nested && this.nested[name]
|
|
20295
|
+
return this.nested && Object.prototype.hasOwnProperty.call(this.nested, name) ? this.nested[name] : null;
|
|
20233
20296
|
}, "get");
|
|
20234
20297
|
Namespace.prototype.getEnum = /* @__PURE__ */ __name(function getEnum(name) {
|
|
20235
|
-
if (this.nested && this.nested[name] instanceof Enum)
|
|
20298
|
+
if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name) && this.nested[name] instanceof Enum)
|
|
20236
20299
|
return this.nested[name].values;
|
|
20237
20300
|
throw Error("no such enum: " + name);
|
|
20238
20301
|
}, "getEnum");
|
|
20239
20302
|
Namespace.prototype.add = /* @__PURE__ */ __name(function add(object) {
|
|
20240
20303
|
if (!(object instanceof Field && object.extend !== void 0 || object instanceof Type || object instanceof OneOf || object instanceof Enum || object instanceof Service || object instanceof Namespace))
|
|
20241
20304
|
throw TypeError("object must be a valid nested object");
|
|
20305
|
+
if (object.name === "__proto__")
|
|
20306
|
+
return this;
|
|
20242
20307
|
if (!this.nested)
|
|
20243
20308
|
this.nested = {};
|
|
20244
20309
|
else {
|
|
@@ -20283,13 +20348,15 @@ var require_namespace = __commonJS({
|
|
|
20283
20348
|
object.onRemove(this);
|
|
20284
20349
|
return clearCache(this);
|
|
20285
20350
|
}, "remove");
|
|
20286
|
-
Namespace.prototype.define = /* @__PURE__ */ __name(function
|
|
20351
|
+
Namespace.prototype.define = /* @__PURE__ */ __name(function define(path8, json) {
|
|
20287
20352
|
if (util.isString(path8))
|
|
20288
20353
|
path8 = path8.split(".");
|
|
20289
20354
|
else if (!Array.isArray(path8))
|
|
20290
20355
|
throw TypeError("illegal path");
|
|
20291
20356
|
if (path8 && path8.length && path8[0] === "")
|
|
20292
20357
|
throw Error("path must be relative");
|
|
20358
|
+
if (path8.length > util.recursionLimit)
|
|
20359
|
+
throw Error("max depth exceeded");
|
|
20293
20360
|
var ptr = this;
|
|
20294
20361
|
while (path8.length > 0) {
|
|
20295
20362
|
var part = path8.shift();
|
|
@@ -20377,8 +20444,10 @@ var require_namespace = __commonJS({
|
|
|
20377
20444
|
}
|
|
20378
20445
|
} else {
|
|
20379
20446
|
for (var i = 0; i < this.nestedArray.length; ++i)
|
|
20380
|
-
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path8, flatPath)))
|
|
20447
|
+
if (this._nestedArray[i] instanceof Namespace && (found = this._nestedArray[i]._lookupImpl(path8, flatPath))) {
|
|
20381
20448
|
exact = found;
|
|
20449
|
+
break;
|
|
20450
|
+
}
|
|
20382
20451
|
}
|
|
20383
20452
|
this._lookupCache[flatPath] = exact;
|
|
20384
20453
|
return exact;
|
|
@@ -20554,19 +20623,21 @@ var require_service = __commonJS({
|
|
|
20554
20623
|
var Method = require_method();
|
|
20555
20624
|
var util = require_util();
|
|
20556
20625
|
var rpc = require_rpc();
|
|
20626
|
+
var reservedRe = util.patterns.reservedRe;
|
|
20557
20627
|
function Service(name, options) {
|
|
20558
20628
|
Namespace.call(this, name, options);
|
|
20559
20629
|
this.methods = {};
|
|
20560
20630
|
this._methodsArray = null;
|
|
20561
20631
|
}
|
|
20562
20632
|
__name(Service, "Service");
|
|
20563
|
-
Service.fromJSON = /* @__PURE__ */ __name(function fromJSON(name, json) {
|
|
20633
|
+
Service.fromJSON = /* @__PURE__ */ __name(function fromJSON(name, json, depth) {
|
|
20634
|
+
depth = util.checkDepth(depth);
|
|
20564
20635
|
var service = new Service(name, json.options);
|
|
20565
20636
|
if (json.methods)
|
|
20566
20637
|
for (var names = Object.keys(json.methods), i = 0; i < names.length; ++i)
|
|
20567
20638
|
service.add(Method.fromJSON(names[i], json.methods[names[i]]));
|
|
20568
20639
|
if (json.nested)
|
|
20569
|
-
service.addJSON(json.nested);
|
|
20640
|
+
service.addJSON(json.nested, depth);
|
|
20570
20641
|
if (json.edition)
|
|
20571
20642
|
service._edition = json.edition;
|
|
20572
20643
|
service.comment = json.comment;
|
|
@@ -20601,7 +20672,7 @@ var require_service = __commonJS({
|
|
|
20601
20672
|
}
|
|
20602
20673
|
__name(clearCache, "clearCache");
|
|
20603
20674
|
Service.prototype.get = /* @__PURE__ */ __name(function get(name) {
|
|
20604
|
-
return this.methods[name]
|
|
20675
|
+
return Object.prototype.hasOwnProperty.call(this.methods, name) ? this.methods[name] : Namespace.prototype.get.call(this, name);
|
|
20605
20676
|
}, "get");
|
|
20606
20677
|
Service.prototype.resolveAll = /* @__PURE__ */ __name(function resolveAll() {
|
|
20607
20678
|
if (!this._needsRecursiveResolve) return this;
|
|
@@ -20624,6 +20695,8 @@ var require_service = __commonJS({
|
|
|
20624
20695
|
if (this.get(object.name))
|
|
20625
20696
|
throw Error("duplicate name '" + object.name + "' in " + this);
|
|
20626
20697
|
if (object instanceof Method) {
|
|
20698
|
+
if (object.name === "__proto__")
|
|
20699
|
+
return this;
|
|
20627
20700
|
this.methods[object.name] = object;
|
|
20628
20701
|
object.parent = this;
|
|
20629
20702
|
return clearCache(this);
|
|
@@ -20645,7 +20718,7 @@ var require_service = __commonJS({
|
|
|
20645
20718
|
for (var i = 0, method; i < /* initializes */
|
|
20646
20719
|
this.methodsArray.length; ++i) {
|
|
20647
20720
|
var methodName = util.lcFirst((method = this._methodsArray[i]).resolve().name).replace(/[^$\w_]/g, "");
|
|
20648
|
-
rpcService[methodName] = util.codegen(["r", "c"],
|
|
20721
|
+
rpcService[methodName] = util.codegen(["r", "c"], reservedRe.test(methodName) ? methodName + "_" : methodName)("return this.rpcCall(m,q,s,r,c)")({
|
|
20649
20722
|
m: method,
|
|
20650
20723
|
q: method.resolvedRequestType.ctor,
|
|
20651
20724
|
s: method.resolvedResponseType.ctor
|
|
@@ -20665,8 +20738,12 @@ var require_message = __commonJS({
|
|
|
20665
20738
|
var util = require_minimal();
|
|
20666
20739
|
function Message(properties) {
|
|
20667
20740
|
if (properties)
|
|
20668
|
-
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
20669
|
-
|
|
20741
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) {
|
|
20742
|
+
var key = keys[i];
|
|
20743
|
+
if (key === "__proto__")
|
|
20744
|
+
continue;
|
|
20745
|
+
this[key] = properties[key];
|
|
20746
|
+
}
|
|
20670
20747
|
}
|
|
20671
20748
|
__name(Message, "Message");
|
|
20672
20749
|
Message.create = /* @__PURE__ */ __name(function create(properties) {
|
|
@@ -20713,7 +20790,7 @@ var require_decoder = __commonJS({
|
|
|
20713
20790
|
}
|
|
20714
20791
|
__name(missing, "missing");
|
|
20715
20792
|
function decoder(mtype) {
|
|
20716
|
-
var gen = util.codegen(["r", "l", "e"], mtype.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (mtype.fieldsArray.filter(function(field2) {
|
|
20793
|
+
var gen = util.codegen(["r", "l", "e", "n"], mtype.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("if(n===undefined)n=0")("if(n>Reader.recursionLimit)")('throw Error("maximum nesting depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (mtype.fieldsArray.filter(function(field2) {
|
|
20717
20794
|
return field2.map;
|
|
20718
20795
|
}).length ? ",k,value" : ""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){");
|
|
20719
20796
|
var i = 0;
|
|
@@ -20728,21 +20805,24 @@ var require_decoder = __commonJS({
|
|
|
20728
20805
|
if (types2.defaults[type] !== void 0) gen("value=%j", types2.defaults[type]);
|
|
20729
20806
|
else gen("value=null");
|
|
20730
20807
|
gen("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break", field.keyType)("case 2:");
|
|
20731
|
-
if (types2.basic[type] === void 0) gen("value=types[%i].decode(r,r.uint32())", i);
|
|
20808
|
+
if (types2.basic[type] === void 0) gen("value=types[%i].decode(r,r.uint32(),undefined,n+1)", i);
|
|
20732
20809
|
else gen("value=r.%s()", type);
|
|
20733
|
-
gen("break")("default:")("r.skipType(tag2&7)")("break")("}")("}");
|
|
20810
|
+
gen("break")("default:")("r.skipType(tag2&7,n)")("break")("}")("}");
|
|
20734
20811
|
if (types2.long[field.keyType] !== void 0) gen('%s[typeof k==="object"?util.longToHash(k):k]=value', ref);
|
|
20735
|
-
else
|
|
20812
|
+
else {
|
|
20813
|
+
if (field.keyType === "string") gen('if(k==="__proto__")')("util.makeProp(%s,k)", ref);
|
|
20814
|
+
gen("%s[k]=value", ref);
|
|
20815
|
+
}
|
|
20736
20816
|
} else if (field.repeated) {
|
|
20737
20817
|
gen("if(!(%s&&%s.length))", ref, ref)("%s=[]", ref);
|
|
20738
20818
|
if (types2.packed[type] !== void 0) gen("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", ref, type)("}else");
|
|
20739
|
-
if (types2.basic[type] === void 0) gen(field.delimited ? "%s.push(types[%i].decode(r,undefined,((t&~7)|4)))" : "%s.push(types[%i].decode(r,r.uint32()))", ref, i);
|
|
20819
|
+
if (types2.basic[type] === void 0) gen(field.delimited ? "%s.push(types[%i].decode(r,undefined,((t&~7)|4),n+1))" : "%s.push(types[%i].decode(r,r.uint32(),undefined,n+1))", ref, i);
|
|
20740
20820
|
else gen("%s.push(r.%s())", ref, type);
|
|
20741
|
-
} else if (types2.basic[type] === void 0) gen(field.delimited ? "%s=types[%i].decode(r,undefined,((t&~7)|4))" : "%s=types[%i].decode(r,r.uint32())", ref, i);
|
|
20821
|
+
} else if (types2.basic[type] === void 0) gen(field.delimited ? "%s=types[%i].decode(r,undefined,((t&~7)|4),n+1)" : "%s=types[%i].decode(r,r.uint32(),undefined,n+1)", ref, i);
|
|
20742
20822
|
else gen("%s=r.%s()", ref, type);
|
|
20743
20823
|
gen("break")("}");
|
|
20744
20824
|
}
|
|
20745
|
-
gen("default:")("r.skipType(t&7)")("break")("}")("}");
|
|
20825
|
+
gen("default:")("r.skipType(t&7,n)")("break")("}")("}");
|
|
20746
20826
|
for (i = 0; i < mtype._fieldsArray.length; ++i) {
|
|
20747
20827
|
var rfield = mtype._fieldsArray[i];
|
|
20748
20828
|
if (rfield.required) gen("if(!m.hasOwnProperty(%j))", rfield.name)("throw util.ProtocolError(%j,{instance:m})", missing(rfield));
|
|
@@ -20772,7 +20852,7 @@ var require_verifier = __commonJS({
|
|
|
20772
20852
|
for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j) gen("case %i:", field.resolvedType.values[keys[j]]);
|
|
20773
20853
|
gen("break")("}");
|
|
20774
20854
|
} else {
|
|
20775
|
-
gen("{")("var e=types[%i].verify(%s);", fieldIndex, ref)("if(e)")("return%j+e", field.name + ".")("}");
|
|
20855
|
+
gen("{")("var e=types[%i].verify(%s,n+1);", fieldIndex, ref)("if(e)")("return%j+e", field.name + ".")("}");
|
|
20776
20856
|
}
|
|
20777
20857
|
} else {
|
|
20778
20858
|
switch (field.type) {
|
|
@@ -20832,7 +20912,7 @@ var require_verifier = __commonJS({
|
|
|
20832
20912
|
}
|
|
20833
20913
|
__name(genVerifyKey, "genVerifyKey");
|
|
20834
20914
|
function verifier(mtype) {
|
|
20835
|
-
var gen = util.codegen(["m"], mtype.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected");
|
|
20915
|
+
var gen = util.codegen(["m", "n"], mtype.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected")("if(n===undefined)n=0")("if(n>util.recursionLimit)")("return%j", "maximum nesting depth exceeded");
|
|
20836
20916
|
var oneofs = mtype.oneofsArray, seenFirstField = {};
|
|
20837
20917
|
if (oneofs.length) gen("var p={}");
|
|
20838
20918
|
for (var i = 0; i < /* initializes */
|
|
@@ -20885,7 +20965,7 @@ var require_converter = __commonJS({
|
|
|
20885
20965
|
gen("case%j:", keys[i])("case %i:", values[keys[i]])("m%s=%j", prop, values[keys[i]])("break");
|
|
20886
20966
|
}
|
|
20887
20967
|
gen("}");
|
|
20888
|
-
} else gen('if(typeof d%s!=="object")', prop)("throw TypeError(%j)", field.fullName + ": object expected")("m%s=types[%i].fromObject(d%s)", prop, fieldIndex, prop);
|
|
20968
|
+
} else gen('if(typeof d%s!=="object")', prop)("throw TypeError(%j)", field.fullName + ": object expected")("m%s=types[%i].fromObject(d%s,n+1)", prop, fieldIndex, prop);
|
|
20889
20969
|
} else {
|
|
20890
20970
|
var isUnsigned = false;
|
|
20891
20971
|
switch (field.type) {
|
|
@@ -20903,13 +20983,13 @@ var require_converter = __commonJS({
|
|
|
20903
20983
|
gen("m%s=d%s|0", prop, prop);
|
|
20904
20984
|
break;
|
|
20905
20985
|
case "uint64":
|
|
20986
|
+
case "fixed64":
|
|
20906
20987
|
isUnsigned = true;
|
|
20907
20988
|
// eslint-disable-next-line no-fallthrough
|
|
20908
20989
|
case "int64":
|
|
20909
20990
|
case "sint64":
|
|
20910
|
-
case "fixed64":
|
|
20911
20991
|
case "sfixed64":
|
|
20912
|
-
gen("if(util.Long)")("
|
|
20992
|
+
gen("if(util.Long)")("m%s=util.Long.fromValue(d%s,%j)", prop, prop, isUnsigned)('else if(typeof d%s==="string")', prop)("m%s=parseInt(d%s,10)", prop, prop)('else if(typeof d%s==="number")', prop)("m%s=d%s", prop, prop)('else if(typeof d%s==="object")', prop)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", prop, prop, prop, isUnsigned ? "true" : "");
|
|
20913
20993
|
break;
|
|
20914
20994
|
case "bytes":
|
|
20915
20995
|
gen('if(typeof d%s==="string")', prop)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", prop, prop, prop)("else if(d%s.length >= 0)", prop)("m%s=d%s", prop, prop);
|
|
@@ -20927,13 +21007,14 @@ var require_converter = __commonJS({
|
|
|
20927
21007
|
__name(genValuePartial_fromObject, "genValuePartial_fromObject");
|
|
20928
21008
|
converter.fromObject = /* @__PURE__ */ __name(function fromObject(mtype) {
|
|
20929
21009
|
var fields = mtype.fieldsArray;
|
|
20930
|
-
var gen = util.codegen(["d"], mtype.name + "$fromObject")("if(d instanceof this.ctor)")("return d");
|
|
21010
|
+
var gen = util.codegen(["d", "n"], mtype.name + "$fromObject")("if(d instanceof this.ctor)")("return d")("if(n===undefined)n=0")("if(n>util.recursionLimit)")('throw Error("maximum nesting depth exceeded")');
|
|
20931
21011
|
if (!fields.length) return gen("return new this.ctor");
|
|
20932
21012
|
gen("var m=new this.ctor");
|
|
20933
21013
|
for (var i = 0; i < fields.length; ++i) {
|
|
20934
21014
|
var field = fields[i].resolve(), prop = util.safeProp(field.name);
|
|
20935
21015
|
if (field.map) {
|
|
20936
21016
|
gen("if(d%s){", prop)('if(typeof d%s!=="object")', prop)("throw TypeError(%j)", field.fullName + ": object expected")("m%s={}", prop)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", prop);
|
|
21017
|
+
gen('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])", prop);
|
|
20937
21018
|
genValuePartial_fromObject(
|
|
20938
21019
|
gen,
|
|
20939
21020
|
field,
|
|
@@ -20967,7 +21048,7 @@ var require_converter = __commonJS({
|
|
|
20967
21048
|
function genValuePartial_toObject(gen, field, fieldIndex, prop) {
|
|
20968
21049
|
if (field.resolvedType) {
|
|
20969
21050
|
if (field.resolvedType instanceof Enum) gen("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s", prop, fieldIndex, prop, prop, fieldIndex, prop, prop);
|
|
20970
|
-
else gen("d%s=types[%i].toObject(m%s,o)", prop, fieldIndex, prop);
|
|
21051
|
+
else gen("d%s=types[%i].toObject(m%s,o,q+1)", prop, fieldIndex, prop);
|
|
20971
21052
|
} else {
|
|
20972
21053
|
var isUnsigned = false;
|
|
20973
21054
|
switch (field.type) {
|
|
@@ -20976,13 +21057,13 @@ var require_converter = __commonJS({
|
|
|
20976
21057
|
gen("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", prop, prop, prop, prop);
|
|
20977
21058
|
break;
|
|
20978
21059
|
case "uint64":
|
|
21060
|
+
case "fixed64":
|
|
20979
21061
|
isUnsigned = true;
|
|
20980
21062
|
// eslint-disable-next-line no-fallthrough
|
|
20981
21063
|
case "int64":
|
|
20982
21064
|
case "sint64":
|
|
20983
|
-
case "fixed64":
|
|
20984
21065
|
case "sfixed64":
|
|
20985
|
-
gen('if(typeof m%s==="number")', prop)("d%s=o.longs===String?String(m%s):m%s", prop, prop, prop)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", prop, prop, prop, prop, isUnsigned ? "true" : "", prop);
|
|
21066
|
+
gen('if(typeof BigInt!=="undefined"&&o.longs===BigInt)')('d%s=typeof m%s==="number"?BigInt(m%s):util.Long.fromBits(m%s.low>>>0,m%s.high>>>0,%j).toBigInt()', prop, prop, prop, prop, prop, isUnsigned)('else if(typeof m%s==="number")', prop)("d%s=o.longs===String?String(m%s):m%s", prop, prop, prop)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", prop, prop, prop, prop, isUnsigned ? "true" : "", prop);
|
|
20986
21067
|
break;
|
|
20987
21068
|
case "bytes":
|
|
20988
21069
|
gen("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", prop, prop, prop, prop, prop);
|
|
@@ -20999,7 +21080,7 @@ var require_converter = __commonJS({
|
|
|
20999
21080
|
var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);
|
|
21000
21081
|
if (!fields.length)
|
|
21001
21082
|
return util.codegen()("return {}");
|
|
21002
|
-
var gen = util.codegen(["m", "o"], mtype.name + "$toObject")("if(!o)")("o={}")("var d={}");
|
|
21083
|
+
var gen = util.codegen(["m", "o", "q"], mtype.name + "$toObject")("if(!o)")("o={}")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")')("var d={}");
|
|
21003
21084
|
var repeatedFields = [], mapFields = [], normalFields = [], i = 0;
|
|
21004
21085
|
for (; i < fields.length; ++i)
|
|
21005
21086
|
if (!fields[i].partOf)
|
|
@@ -21019,10 +21100,10 @@ var require_converter = __commonJS({
|
|
|
21019
21100
|
for (i = 0; i < normalFields.length; ++i) {
|
|
21020
21101
|
var field = normalFields[i], prop = util.safeProp(field.name);
|
|
21021
21102
|
if (field.resolvedType instanceof Enum) gen("d%s=o.enums===String?%j:%j", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);
|
|
21022
|
-
else if (field.long) gen("if(util.Long){")("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)(
|
|
21103
|
+
else if (field.long) gen("if(util.Long){")("var n=new util.Long(%i,%i,%j)", field.typeDefault.low, field.typeDefault.high, field.typeDefault.unsigned)('d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():typeof BigInt!=="undefined"&&o.longs===BigInt?n.toBigInt():n', prop)("}else")('d%s=o.longs===String?%j:typeof BigInt!=="undefined"&&o.longs===BigInt?BigInt(%j):%i', prop, field.typeDefault.toString(), field.typeDefault.toString(), field.typeDefault.toNumber());
|
|
21023
21104
|
else if (field.bytes) {
|
|
21024
|
-
var arrayDefault =
|
|
21025
|
-
gen("if(o.bytes===String)d%s=%j", prop, String.fromCharCode.apply(String, field.typeDefault))("else{")("d%s=%
|
|
21105
|
+
var arrayDefault = Array.prototype.slice.call(field.typeDefault);
|
|
21106
|
+
gen("if(o.bytes===String)d%s=%j", prop, String.fromCharCode.apply(String, field.typeDefault))("else{")("d%s=%j", prop, arrayDefault)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", prop, prop)("}");
|
|
21026
21107
|
} else gen("d%s=%j", prop, field.typeDefault);
|
|
21027
21108
|
}
|
|
21028
21109
|
gen("}");
|
|
@@ -21036,6 +21117,7 @@ var require_converter = __commonJS({
|
|
|
21036
21117
|
gen("var ks2");
|
|
21037
21118
|
}
|
|
21038
21119
|
gen("if(m%s&&(ks2=Object.keys(m%s)).length){", prop, prop)("d%s={}", prop)("for(var j=0;j<ks2.length;++j){");
|
|
21120
|
+
gen('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])", prop);
|
|
21039
21121
|
genValuePartial_toObject(
|
|
21040
21122
|
gen,
|
|
21041
21123
|
field,
|
|
@@ -21077,8 +21159,9 @@ var require_wrappers = __commonJS({
|
|
|
21077
21159
|
init_esbuild_shims();
|
|
21078
21160
|
var wrappers = exports;
|
|
21079
21161
|
var Message = require_message();
|
|
21162
|
+
var util = require_minimal();
|
|
21080
21163
|
wrappers[".google.protobuf.Any"] = {
|
|
21081
|
-
fromObject: /* @__PURE__ */ __name(function(object) {
|
|
21164
|
+
fromObject: /* @__PURE__ */ __name(function(object, depth) {
|
|
21082
21165
|
if (object && object["@type"]) {
|
|
21083
21166
|
var name = object["@type"].substring(object["@type"].lastIndexOf("/") + 1);
|
|
21084
21167
|
var type = this.lookup(name);
|
|
@@ -21089,13 +21172,17 @@ var require_wrappers = __commonJS({
|
|
|
21089
21172
|
}
|
|
21090
21173
|
return this.create({
|
|
21091
21174
|
type_url,
|
|
21092
|
-
value: type.encode(type.fromObject(object)).finish()
|
|
21175
|
+
value: type.encode(type.fromObject(object, depth === void 0 ? 1 : depth + 1)).finish()
|
|
21093
21176
|
});
|
|
21094
21177
|
}
|
|
21095
21178
|
}
|
|
21096
|
-
return this.fromObject(object);
|
|
21179
|
+
return this.fromObject(object, depth);
|
|
21097
21180
|
}, "fromObject"),
|
|
21098
|
-
toObject: /* @__PURE__ */ __name(function(message, options) {
|
|
21181
|
+
toObject: /* @__PURE__ */ __name(function(message, options, depth) {
|
|
21182
|
+
if (depth === void 0)
|
|
21183
|
+
depth = 0;
|
|
21184
|
+
if (depth > util.recursionLimit)
|
|
21185
|
+
throw Error("max depth exceeded");
|
|
21099
21186
|
var googleApi = "type.googleapis.com/";
|
|
21100
21187
|
var prefix = "";
|
|
21101
21188
|
var name = "";
|
|
@@ -21104,10 +21191,10 @@ var require_wrappers = __commonJS({
|
|
|
21104
21191
|
prefix = message.type_url.substring(0, message.type_url.lastIndexOf("/") + 1);
|
|
21105
21192
|
var type = this.lookup(name);
|
|
21106
21193
|
if (type)
|
|
21107
|
-
message = type.decode(message.value);
|
|
21194
|
+
message = type.decode(message.value, void 0, void 0, depth + 1);
|
|
21108
21195
|
}
|
|
21109
21196
|
if (!(message instanceof this.ctor) && message instanceof Message) {
|
|
21110
|
-
var object = message.$type.toObject(message, options);
|
|
21197
|
+
var object = message.$type.toObject(message, options, depth + 1);
|
|
21111
21198
|
var messageName = message.$type.fullName[0] === "." ? message.$type.fullName.slice(1) : message.$type.fullName;
|
|
21112
21199
|
if (prefix === "") {
|
|
21113
21200
|
prefix = googleApi;
|
|
@@ -21116,7 +21203,7 @@ var require_wrappers = __commonJS({
|
|
|
21116
21203
|
object["@type"] = name;
|
|
21117
21204
|
return object;
|
|
21118
21205
|
}
|
|
21119
|
-
return this.toObject(message, options);
|
|
21206
|
+
return this.toObject(message, options, depth);
|
|
21120
21207
|
}, "toObject")
|
|
21121
21208
|
};
|
|
21122
21209
|
}
|
|
@@ -21145,6 +21232,7 @@ var require_type = __commonJS({
|
|
|
21145
21232
|
var converter = require_converter();
|
|
21146
21233
|
var wrappers = require_wrappers();
|
|
21147
21234
|
function Type(name, options) {
|
|
21235
|
+
name = name.replace(/\W/g, "");
|
|
21148
21236
|
Namespace.call(this, name, options);
|
|
21149
21237
|
this.fields = {};
|
|
21150
21238
|
this.oneofs = void 0;
|
|
@@ -21240,7 +21328,7 @@ var require_type = __commonJS({
|
|
|
21240
21328
|
for (var i = 0, field; i < mtype.fieldsArray.length; ++i)
|
|
21241
21329
|
if ((field = mtype._fieldsArray[i]).map) gen("this%s={}", util.safeProp(field.name));
|
|
21242
21330
|
else if (field.repeated) gen("this%s=[]", util.safeProp(field.name));
|
|
21243
|
-
return gen(
|
|
21331
|
+
return gen('if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null&&ks[i]!=="__proto__")')("this[ks[i]]=p[ks[i]]");
|
|
21244
21332
|
}, "generateConstructor");
|
|
21245
21333
|
function clearCache(type) {
|
|
21246
21334
|
type._fieldsById = type._fieldsArray = type._oneofsArray = null;
|
|
@@ -21250,7 +21338,11 @@ var require_type = __commonJS({
|
|
|
21250
21338
|
return type;
|
|
21251
21339
|
}
|
|
21252
21340
|
__name(clearCache, "clearCache");
|
|
21253
|
-
Type.fromJSON = /* @__PURE__ */ __name(function fromJSON(name, json) {
|
|
21341
|
+
Type.fromJSON = /* @__PURE__ */ __name(function fromJSON(name, json, depth) {
|
|
21342
|
+
if (depth === void 0)
|
|
21343
|
+
depth = 0;
|
|
21344
|
+
if (depth > util.nestingLimit)
|
|
21345
|
+
throw Error("max depth exceeded");
|
|
21254
21346
|
var type = new Type(name, json.options);
|
|
21255
21347
|
type.extensions = json.extensions;
|
|
21256
21348
|
type.reserved = json.reserved;
|
|
@@ -21267,7 +21359,7 @@ var require_type = __commonJS({
|
|
|
21267
21359
|
var nested = json.nested[names[i]];
|
|
21268
21360
|
type.add(
|
|
21269
21361
|
// most to least likely
|
|
21270
|
-
(nested.id !== void 0 ? Field.fromJSON : nested.fields !== void 0 ? Type.fromJSON : nested.values !== void 0 ? Enum.fromJSON : nested.methods !== void 0 ? Service.fromJSON : Namespace.fromJSON)(names[i], nested)
|
|
21362
|
+
(nested.id !== void 0 ? Field.fromJSON : nested.fields !== void 0 ? Type.fromJSON : nested.values !== void 0 ? Enum.fromJSON : nested.methods !== void 0 ? Service.fromJSON : Namespace.fromJSON)(names[i], nested, depth + 1)
|
|
21271
21363
|
);
|
|
21272
21364
|
}
|
|
21273
21365
|
if (json.extensions && json.extensions.length)
|
|
@@ -21334,7 +21426,13 @@ var require_type = __commonJS({
|
|
|
21334
21426
|
return this;
|
|
21335
21427
|
}, "_resolveFeaturesRecursive");
|
|
21336
21428
|
Type.prototype.get = /* @__PURE__ */ __name(function get(name) {
|
|
21337
|
-
|
|
21429
|
+
if (Object.prototype.hasOwnProperty.call(this.fields, name))
|
|
21430
|
+
return this.fields[name];
|
|
21431
|
+
if (this.oneofs && Object.prototype.hasOwnProperty.call(this.oneofs, name))
|
|
21432
|
+
return this.oneofs[name];
|
|
21433
|
+
if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, name))
|
|
21434
|
+
return this.nested[name];
|
|
21435
|
+
return null;
|
|
21338
21436
|
}, "get");
|
|
21339
21437
|
Type.prototype.add = /* @__PURE__ */ __name(function add(object) {
|
|
21340
21438
|
if (this.get(object.name))
|
|
@@ -21349,6 +21447,8 @@ var require_type = __commonJS({
|
|
|
21349
21447
|
throw Error("id " + object.id + " is reserved in " + this);
|
|
21350
21448
|
if (this.isReservedName(object.name))
|
|
21351
21449
|
throw Error("name '" + object.name + "' is reserved in " + this);
|
|
21450
|
+
if (object.name === "__proto__")
|
|
21451
|
+
return this;
|
|
21352
21452
|
if (object.parent)
|
|
21353
21453
|
object.parent.remove(object);
|
|
21354
21454
|
this.fields[object.name] = object;
|
|
@@ -21357,6 +21457,8 @@ var require_type = __commonJS({
|
|
|
21357
21457
|
return clearCache(this);
|
|
21358
21458
|
}
|
|
21359
21459
|
if (object instanceof OneOf) {
|
|
21460
|
+
if (object.name === "__proto__")
|
|
21461
|
+
return this;
|
|
21360
21462
|
if (!this.oneofs)
|
|
21361
21463
|
this.oneofs = {};
|
|
21362
21464
|
this.oneofs[object.name] = object;
|
|
@@ -21431,27 +21533,27 @@ var require_type = __commonJS({
|
|
|
21431
21533
|
return this;
|
|
21432
21534
|
}, "setup");
|
|
21433
21535
|
Type.prototype.encode = /* @__PURE__ */ __name(function encode_setup(message, writer) {
|
|
21434
|
-
return this.setup().encode(
|
|
21536
|
+
return this.setup().encode.apply(this, arguments);
|
|
21435
21537
|
}, "encode_setup");
|
|
21436
21538
|
Type.prototype.encodeDelimited = /* @__PURE__ */ __name(function encodeDelimited(message, writer) {
|
|
21437
21539
|
return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim();
|
|
21438
21540
|
}, "encodeDelimited");
|
|
21439
|
-
Type.prototype.decode = /* @__PURE__ */ __name(function decode_setup(reader, length) {
|
|
21440
|
-
return this.setup().decode(reader, length);
|
|
21541
|
+
Type.prototype.decode = /* @__PURE__ */ __name(function decode_setup(reader, length, end, depth) {
|
|
21542
|
+
return this.setup().decode(reader, length, end, depth);
|
|
21441
21543
|
}, "decode_setup");
|
|
21442
21544
|
Type.prototype.decodeDelimited = /* @__PURE__ */ __name(function decodeDelimited(reader) {
|
|
21443
21545
|
if (!(reader instanceof Reader))
|
|
21444
21546
|
reader = Reader.create(reader);
|
|
21445
21547
|
return this.decode(reader, reader.uint32());
|
|
21446
21548
|
}, "decodeDelimited");
|
|
21447
|
-
Type.prototype.verify = /* @__PURE__ */ __name(function verify_setup(message) {
|
|
21448
|
-
return this.setup().verify(message);
|
|
21549
|
+
Type.prototype.verify = /* @__PURE__ */ __name(function verify_setup(message, depth) {
|
|
21550
|
+
return this.setup().verify(message, depth);
|
|
21449
21551
|
}, "verify_setup");
|
|
21450
|
-
Type.prototype.fromObject = /* @__PURE__ */ __name(function fromObject(object) {
|
|
21451
|
-
return this.setup().fromObject(object);
|
|
21552
|
+
Type.prototype.fromObject = /* @__PURE__ */ __name(function fromObject(object, depth) {
|
|
21553
|
+
return this.setup().fromObject(object, depth);
|
|
21452
21554
|
}, "fromObject");
|
|
21453
21555
|
Type.prototype.toObject = /* @__PURE__ */ __name(function toObject(message, options) {
|
|
21454
|
-
return this.setup().toObject(
|
|
21556
|
+
return this.setup().toObject.apply(this, arguments);
|
|
21455
21557
|
}, "toObject");
|
|
21456
21558
|
Type.d = /* @__PURE__ */ __name(function decorateType(typeName) {
|
|
21457
21559
|
return /* @__PURE__ */ __name(function typeDecorator(target) {
|
|
@@ -21484,12 +21586,13 @@ var require_root = __commonJS({
|
|
|
21484
21586
|
this._fullyQualifiedObjects = {};
|
|
21485
21587
|
}
|
|
21486
21588
|
__name(Root, "Root");
|
|
21487
|
-
Root.fromJSON = /* @__PURE__ */ __name(function fromJSON(json, root) {
|
|
21589
|
+
Root.fromJSON = /* @__PURE__ */ __name(function fromJSON(json, root, depth) {
|
|
21590
|
+
depth = util.checkDepth(depth);
|
|
21488
21591
|
if (!root)
|
|
21489
21592
|
root = new Root();
|
|
21490
21593
|
if (json.options)
|
|
21491
21594
|
root.setOptions(json.options);
|
|
21492
|
-
return root.addJSON(json.nested).resolveAll();
|
|
21595
|
+
return root.addJSON(json.nested, depth).resolveAll();
|
|
21493
21596
|
}, "fromJSON");
|
|
21494
21597
|
Root.prototype.resolvePath = util.path.resolve;
|
|
21495
21598
|
Root.prototype.fetch = util.fetch;
|
|
@@ -21530,8 +21633,12 @@ var require_root = __commonJS({
|
|
|
21530
21633
|
return null;
|
|
21531
21634
|
}
|
|
21532
21635
|
__name(getBundledFileName, "getBundledFileName");
|
|
21533
|
-
function process3(filename2, source) {
|
|
21636
|
+
function process3(filename2, source, depth) {
|
|
21637
|
+
if (depth === void 0)
|
|
21638
|
+
depth = 0;
|
|
21534
21639
|
try {
|
|
21640
|
+
if (depth > util.recursionLimit)
|
|
21641
|
+
throw Error("max depth exceeded");
|
|
21535
21642
|
if (util.isString(source) && source.charAt(0) === "{")
|
|
21536
21643
|
source = JSON.parse(source);
|
|
21537
21644
|
if (!util.isString(source))
|
|
@@ -21542,12 +21649,12 @@ var require_root = __commonJS({
|
|
|
21542
21649
|
if (parsed.imports) {
|
|
21543
21650
|
for (; i2 < parsed.imports.length; ++i2)
|
|
21544
21651
|
if (resolved2 = getBundledFileName(parsed.imports[i2]) || self2.resolvePath(filename2, parsed.imports[i2]))
|
|
21545
|
-
fetch(resolved2);
|
|
21652
|
+
fetch(resolved2, false, depth + 1);
|
|
21546
21653
|
}
|
|
21547
21654
|
if (parsed.weakImports) {
|
|
21548
21655
|
for (i2 = 0; i2 < parsed.weakImports.length; ++i2)
|
|
21549
21656
|
if (resolved2 = getBundledFileName(parsed.weakImports[i2]) || self2.resolvePath(filename2, parsed.weakImports[i2]))
|
|
21550
|
-
fetch(resolved2, true);
|
|
21657
|
+
fetch(resolved2, true, depth + 1);
|
|
21551
21658
|
}
|
|
21552
21659
|
}
|
|
21553
21660
|
} catch (err) {
|
|
@@ -21558,7 +21665,9 @@ var require_root = __commonJS({
|
|
|
21558
21665
|
}
|
|
21559
21666
|
}
|
|
21560
21667
|
__name(process3, "process");
|
|
21561
|
-
function fetch(filename2, weak) {
|
|
21668
|
+
function fetch(filename2, weak, depth) {
|
|
21669
|
+
if (depth === void 0)
|
|
21670
|
+
depth = 0;
|
|
21562
21671
|
filename2 = getBundledFileName(filename2) || filename2;
|
|
21563
21672
|
if (self2.files.indexOf(filename2) > -1) {
|
|
21564
21673
|
return;
|
|
@@ -21566,12 +21675,12 @@ var require_root = __commonJS({
|
|
|
21566
21675
|
self2.files.push(filename2);
|
|
21567
21676
|
if (filename2 in common) {
|
|
21568
21677
|
if (sync) {
|
|
21569
|
-
process3(filename2, common[filename2]);
|
|
21678
|
+
process3(filename2, common[filename2], depth);
|
|
21570
21679
|
} else {
|
|
21571
21680
|
++queued;
|
|
21572
21681
|
setTimeout(function() {
|
|
21573
21682
|
--queued;
|
|
21574
|
-
process3(filename2, common[filename2]);
|
|
21683
|
+
process3(filename2, common[filename2], depth);
|
|
21575
21684
|
});
|
|
21576
21685
|
}
|
|
21577
21686
|
return;
|
|
@@ -21585,7 +21694,7 @@ var require_root = __commonJS({
|
|
|
21585
21694
|
finish(err);
|
|
21586
21695
|
return;
|
|
21587
21696
|
}
|
|
21588
|
-
process3(filename2, source);
|
|
21697
|
+
process3(filename2, source, depth);
|
|
21589
21698
|
} else {
|
|
21590
21699
|
++queued;
|
|
21591
21700
|
self2.fetch(filename2, function(err, source2) {
|
|
@@ -21600,7 +21709,7 @@ var require_root = __commonJS({
|
|
|
21600
21709
|
finish(null, self2);
|
|
21601
21710
|
return;
|
|
21602
21711
|
}
|
|
21603
|
-
process3(filename2, source2);
|
|
21712
|
+
process3(filename2, source2, depth);
|
|
21604
21713
|
});
|
|
21605
21714
|
}
|
|
21606
21715
|
}
|
|
@@ -21730,7 +21839,16 @@ var require_util = __commonJS({
|
|
|
21730
21839
|
util.codegen = require_codegen();
|
|
21731
21840
|
util.fetch = require_fetch();
|
|
21732
21841
|
util.path = require_path();
|
|
21733
|
-
util.
|
|
21842
|
+
util.patterns = require_patterns();
|
|
21843
|
+
var reservedRe = util.patterns.reservedRe;
|
|
21844
|
+
util.fs = require_fs2();
|
|
21845
|
+
util.checkDepth = /* @__PURE__ */ __name(function checkDepth(depth) {
|
|
21846
|
+
if (depth === void 0)
|
|
21847
|
+
depth = 0;
|
|
21848
|
+
if (depth > util.recursionLimit)
|
|
21849
|
+
throw Error("max depth exceeded");
|
|
21850
|
+
return depth;
|
|
21851
|
+
}, "checkDepth");
|
|
21734
21852
|
util.toArray = /* @__PURE__ */ __name(function toArray(object) {
|
|
21735
21853
|
if (object) {
|
|
21736
21854
|
var keys = Object.keys(object), array = new Array(keys.length), index = 0;
|
|
@@ -21749,14 +21867,12 @@ var require_util = __commonJS({
|
|
|
21749
21867
|
}
|
|
21750
21868
|
return object;
|
|
21751
21869
|
}, "toObject");
|
|
21752
|
-
var safePropBackslashRe = /\\/g;
|
|
21753
|
-
var safePropQuoteRe = /"/g;
|
|
21754
21870
|
util.isReserved = /* @__PURE__ */ __name(function isReserved(name) {
|
|
21755
|
-
return
|
|
21871
|
+
return reservedRe.test(name);
|
|
21756
21872
|
}, "isReserved");
|
|
21757
21873
|
util.safeProp = /* @__PURE__ */ __name(function safeProp(prop) {
|
|
21758
|
-
if (!/^[$\w_]+$/.test(prop) ||
|
|
21759
|
-
return
|
|
21874
|
+
if (!/^[$\w_]+$/.test(prop) || reservedRe.test(prop))
|
|
21875
|
+
return "[" + JSON.stringify(prop) + "]";
|
|
21760
21876
|
return "." + prop;
|
|
21761
21877
|
}, "safeProp");
|
|
21762
21878
|
util.ucFirst = /* @__PURE__ */ __name(function ucFirst(str) {
|
|
@@ -21803,9 +21919,8 @@ var require_util = __commonJS({
|
|
|
21803
21919
|
util.setProperty = /* @__PURE__ */ __name(function setProperty(dst, path8, value, ifNotSet) {
|
|
21804
21920
|
function setProp(dst2, path9, value2) {
|
|
21805
21921
|
var part = path9.shift();
|
|
21806
|
-
if (part
|
|
21922
|
+
if (util.isUnsafeProperty(part))
|
|
21807
21923
|
return dst2;
|
|
21808
|
-
}
|
|
21809
21924
|
if (path9.length > 0) {
|
|
21810
21925
|
dst2[part] = setProp(dst2[part] || {}, path9, value2);
|
|
21811
21926
|
} else {
|
|
@@ -21824,6 +21939,8 @@ var require_util = __commonJS({
|
|
|
21824
21939
|
if (!path8)
|
|
21825
21940
|
throw TypeError("path must be specified");
|
|
21826
21941
|
path8 = path8.split(".");
|
|
21942
|
+
if (path8.length > util.recursionLimit)
|
|
21943
|
+
throw Error("max depth exceeded");
|
|
21827
21944
|
return setProp(dst, path8, value);
|
|
21828
21945
|
}, "setProperty");
|
|
21829
21946
|
Object.defineProperty(util, "decorateRoot", {
|
|
@@ -21874,7 +21991,7 @@ var require_types = __commonJS({
|
|
|
21874
21991
|
// 14
|
|
21875
21992
|
];
|
|
21876
21993
|
function bake(values, offset) {
|
|
21877
|
-
var i = 0, o =
|
|
21994
|
+
var i = 0, o = /* @__PURE__ */ Object.create(null);
|
|
21878
21995
|
offset |= 0;
|
|
21879
21996
|
while (i < values.length) o[s[i + offset]] = values[i++];
|
|
21880
21997
|
return o;
|
|
@@ -22154,7 +22271,7 @@ var require_field = __commonJS({
|
|
|
22154
22271
|
this.options = void 0;
|
|
22155
22272
|
}
|
|
22156
22273
|
if (this.long) {
|
|
22157
|
-
this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type.
|
|
22274
|
+
this.typeDefault = util.Long.fromNumber(this.typeDefault, this.type === "uint64" || this.type === "fixed64");
|
|
22158
22275
|
if (Object.freeze)
|
|
22159
22276
|
Object.freeze(this.typeDefault);
|
|
22160
22277
|
} else if (this.bytes && typeof this.typeDefault === "string") {
|
|
@@ -22426,8 +22543,9 @@ var require_object = __commonJS({
|
|
|
22426
22543
|
if (!edition) {
|
|
22427
22544
|
throw new Error("Unknown edition for " + this.fullName);
|
|
22428
22545
|
}
|
|
22429
|
-
var protoFeatures =
|
|
22430
|
-
|
|
22546
|
+
var protoFeatures = util.merge(
|
|
22547
|
+
{},
|
|
22548
|
+
this.options && this.options.features,
|
|
22431
22549
|
this._inferLegacyProtoFeatures(edition)
|
|
22432
22550
|
);
|
|
22433
22551
|
if (this._edition) {
|
|
@@ -22440,17 +22558,17 @@ var require_object = __commonJS({
|
|
|
22440
22558
|
} else {
|
|
22441
22559
|
throw new Error("Unknown edition: " + edition);
|
|
22442
22560
|
}
|
|
22443
|
-
this._features =
|
|
22561
|
+
this._features = util.merge(defaults, protoFeatures);
|
|
22444
22562
|
this._featuresResolved = true;
|
|
22445
22563
|
return;
|
|
22446
22564
|
}
|
|
22447
22565
|
if (this.partOf instanceof OneOf) {
|
|
22448
|
-
var lexicalParentFeaturesCopy =
|
|
22449
|
-
this._features =
|
|
22566
|
+
var lexicalParentFeaturesCopy = util.merge({}, this.partOf._features);
|
|
22567
|
+
this._features = util.merge(lexicalParentFeaturesCopy, protoFeatures);
|
|
22450
22568
|
} else if (this.declaringField) {
|
|
22451
22569
|
} else if (this.parent) {
|
|
22452
|
-
var parentFeaturesCopy =
|
|
22453
|
-
this._features =
|
|
22570
|
+
var parentFeaturesCopy = util.merge({}, this.parent._features);
|
|
22571
|
+
this._features = util.merge(parentFeaturesCopy, protoFeatures);
|
|
22454
22572
|
} else {
|
|
22455
22573
|
throw new Error("Unable to find a parent for " + this.fullName);
|
|
22456
22574
|
}
|
|
@@ -22468,6 +22586,8 @@ var require_object = __commonJS({
|
|
|
22468
22586
|
return void 0;
|
|
22469
22587
|
}, "getOption");
|
|
22470
22588
|
ReflectionObject.prototype.setOption = /* @__PURE__ */ __name(function setOption(name, value, ifNotSet) {
|
|
22589
|
+
if (name === "__proto__")
|
|
22590
|
+
return this;
|
|
22471
22591
|
if (!this.options)
|
|
22472
22592
|
this.options = {};
|
|
22473
22593
|
if (/^features\./.test(name)) {
|
|
@@ -22479,6 +22599,8 @@ var require_object = __commonJS({
|
|
|
22479
22599
|
return this;
|
|
22480
22600
|
}, "setOption");
|
|
22481
22601
|
ReflectionObject.prototype.setParsedOption = /* @__PURE__ */ __name(function setParsedOption(name, value, propName) {
|
|
22602
|
+
if (name === "__proto__")
|
|
22603
|
+
return this;
|
|
22482
22604
|
if (!this.parsedOptions) {
|
|
22483
22605
|
this.parsedOptions = [];
|
|
22484
22606
|
}
|
|
@@ -22549,7 +22671,7 @@ var require_enum = __commonJS({
|
|
|
22549
22671
|
this.reserved = void 0;
|
|
22550
22672
|
if (values) {
|
|
22551
22673
|
for (var keys = Object.keys(values), i = 0; i < keys.length; ++i)
|
|
22552
|
-
if (typeof values[keys[i]] === "number")
|
|
22674
|
+
if (keys[i] !== "__proto__" && typeof values[keys[i]] === "number")
|
|
22553
22675
|
this.valuesById[this.values[keys[i]] = values[keys[i]]] = keys[i];
|
|
22554
22676
|
}
|
|
22555
22677
|
}
|
|
@@ -22558,8 +22680,8 @@ var require_enum = __commonJS({
|
|
|
22558
22680
|
edition = this._edition || edition;
|
|
22559
22681
|
ReflectionObject.prototype._resolveFeatures.call(this, edition);
|
|
22560
22682
|
Object.keys(this.values).forEach((key) => {
|
|
22561
|
-
var parentFeaturesCopy =
|
|
22562
|
-
this._valuesFeatures[key] =
|
|
22683
|
+
var parentFeaturesCopy = util.merge({}, this._features);
|
|
22684
|
+
this._valuesFeatures[key] = util.merge(parentFeaturesCopy, this.valuesOptions && this.valuesOptions[key] && this.valuesOptions[key].features || {});
|
|
22563
22685
|
});
|
|
22564
22686
|
return this;
|
|
22565
22687
|
}, "_resolveFeatures");
|
|
@@ -22595,6 +22717,8 @@ var require_enum = __commonJS({
|
|
|
22595
22717
|
throw TypeError("name must be a string");
|
|
22596
22718
|
if (!util.isInteger(id))
|
|
22597
22719
|
throw TypeError("id must be an integer");
|
|
22720
|
+
if (name === "__proto__")
|
|
22721
|
+
return this;
|
|
22598
22722
|
if (this.values[name] !== void 0)
|
|
22599
22723
|
throw Error("duplicate name '" + name + "' in " + this);
|
|
22600
22724
|
if (this.isReservedId(id))
|
|
@@ -22647,11 +22771,11 @@ var require_encoder = __commonJS({
|
|
|
22647
22771
|
var types2 = require_types();
|
|
22648
22772
|
var util = require_util();
|
|
22649
22773
|
function genTypePartial(gen, field, fieldIndex, ref) {
|
|
22650
|
-
return field.delimited ? gen("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0) : gen("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0);
|
|
22774
|
+
return field.delimited ? gen("types[%i].encode(%s,w.uint32(%i),q+1).uint32(%i)", fieldIndex, ref, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0) : gen("types[%i].encode(%s,w.uint32(%i).fork(),q+1).ldelim()", fieldIndex, ref, (field.id << 3 | 2) >>> 0);
|
|
22651
22775
|
}
|
|
22652
22776
|
__name(genTypePartial, "genTypePartial");
|
|
22653
22777
|
function encoder(mtype) {
|
|
22654
|
-
var gen = util.codegen(["m", "w"], mtype.name + "$encode")("if(!w)")("w=Writer.create()");
|
|
22778
|
+
var gen = util.codegen(["m", "w", "q"], mtype.name + "$encode")("if(!w)")("w=Writer.create()")("if(q===undefined)q=0")("if(q>util.recursionLimit)")('throw Error("max depth exceeded")');
|
|
22655
22779
|
var i, ref;
|
|
22656
22780
|
var fields = (
|
|
22657
22781
|
/* initializes */
|
|
@@ -22662,7 +22786,7 @@ var require_encoder = __commonJS({
|
|
|
22662
22786
|
ref = "m" + util.safeProp(field.name);
|
|
22663
22787
|
if (field.map) {
|
|
22664
22788
|
gen("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", ref, field.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", ref)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (field.id << 3 | 2) >>> 0, 8 | types2.mapKey[field.keyType], field.keyType);
|
|
22665
|
-
if (wireType === void 0) gen("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", index, ref);
|
|
22789
|
+
if (wireType === void 0) gen("types[%i].encode(%s[ks[i]],w.uint32(18).fork(),q+1).ldelim().ldelim()", index, ref);
|
|
22666
22790
|
else gen(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | wireType, type, ref);
|
|
22667
22791
|
gen("}")("}");
|
|
22668
22792
|
} else if (field.repeated) {
|
|
@@ -23025,9 +23149,9 @@ var require_parse = __commonJS({
|
|
|
23025
23149
|
var base16NegRe = /^-?0[x][0-9a-fA-F]+$/;
|
|
23026
23150
|
var base8Re = /^0[0-7]+$/;
|
|
23027
23151
|
var base8NegRe = /^-?0[0-7]+$/;
|
|
23028
|
-
var numberRe =
|
|
23152
|
+
var numberRe = util.patterns.numberRe;
|
|
23029
23153
|
var nameRe = /^[a-zA-Z_][a-zA-Z_0-9]*$/;
|
|
23030
|
-
var typeRefRe =
|
|
23154
|
+
var typeRefRe = util.patterns.typeRefRe;
|
|
23031
23155
|
function parse(source, root, options) {
|
|
23032
23156
|
if (!(root instanceof Root)) {
|
|
23033
23157
|
options = root;
|
|
@@ -23238,23 +23362,25 @@ var require_parse = __commonJS({
|
|
|
23238
23362
|
skip(";");
|
|
23239
23363
|
}
|
|
23240
23364
|
__name(parseEdition, "parseEdition");
|
|
23241
|
-
function parseCommon(parent, token2) {
|
|
23365
|
+
function parseCommon(parent, token2, depth) {
|
|
23366
|
+
if (depth === void 0)
|
|
23367
|
+
depth = 0;
|
|
23242
23368
|
switch (token2) {
|
|
23243
23369
|
case "option":
|
|
23244
23370
|
parseOption(parent, token2);
|
|
23245
23371
|
skip(";");
|
|
23246
23372
|
return true;
|
|
23247
23373
|
case "message":
|
|
23248
|
-
parseType(parent, token2);
|
|
23374
|
+
parseType(parent, token2, depth + 1);
|
|
23249
23375
|
return true;
|
|
23250
23376
|
case "enum":
|
|
23251
23377
|
parseEnum(parent, token2);
|
|
23252
23378
|
return true;
|
|
23253
23379
|
case "service":
|
|
23254
|
-
parseService(parent, token2);
|
|
23380
|
+
parseService(parent, token2, depth + 1);
|
|
23255
23381
|
return true;
|
|
23256
23382
|
case "extend":
|
|
23257
|
-
parseExtension(parent, token2);
|
|
23383
|
+
parseExtension(parent, token2, depth);
|
|
23258
23384
|
return true;
|
|
23259
23385
|
}
|
|
23260
23386
|
return false;
|
|
@@ -23282,12 +23408,16 @@ var require_parse = __commonJS({
|
|
|
23282
23408
|
}
|
|
23283
23409
|
}
|
|
23284
23410
|
__name(ifBlock, "ifBlock");
|
|
23285
|
-
function parseType(parent, token2) {
|
|
23411
|
+
function parseType(parent, token2, depth) {
|
|
23412
|
+
if (depth === void 0)
|
|
23413
|
+
depth = 0;
|
|
23414
|
+
if (depth > util.nestingLimit)
|
|
23415
|
+
throw Error("max depth exceeded");
|
|
23286
23416
|
if (!nameRe.test(token2 = next()))
|
|
23287
23417
|
throw illegal(token2, "type name");
|
|
23288
23418
|
var type = new Type(token2);
|
|
23289
23419
|
ifBlock(type, /* @__PURE__ */ __name(function parseType_block(token3) {
|
|
23290
|
-
if (parseCommon(type, token3))
|
|
23420
|
+
if (parseCommon(type, token3, depth))
|
|
23291
23421
|
return;
|
|
23292
23422
|
switch (token3) {
|
|
23293
23423
|
case "map":
|
|
@@ -23298,19 +23428,19 @@ var require_parse = __commonJS({
|
|
|
23298
23428
|
throw illegal(token3);
|
|
23299
23429
|
/* eslint-disable no-fallthrough */
|
|
23300
23430
|
case "repeated":
|
|
23301
|
-
parseField(type, token3);
|
|
23431
|
+
parseField(type, token3, void 0, depth + 1);
|
|
23302
23432
|
break;
|
|
23303
23433
|
case "optional":
|
|
23304
23434
|
if (edition === "proto3") {
|
|
23305
|
-
parseField(type, "proto3_optional");
|
|
23435
|
+
parseField(type, "proto3_optional", void 0, depth + 1);
|
|
23306
23436
|
} else if (edition !== "proto2") {
|
|
23307
23437
|
throw illegal(token3);
|
|
23308
23438
|
} else {
|
|
23309
|
-
parseField(type, "optional");
|
|
23439
|
+
parseField(type, "optional", void 0, depth + 1);
|
|
23310
23440
|
}
|
|
23311
23441
|
break;
|
|
23312
23442
|
case "oneof":
|
|
23313
|
-
parseOneOf(type, token3);
|
|
23443
|
+
parseOneOf(type, token3, depth + 1);
|
|
23314
23444
|
break;
|
|
23315
23445
|
case "extensions":
|
|
23316
23446
|
readRanges(type.extensions || (type.extensions = []));
|
|
@@ -23323,7 +23453,7 @@ var require_parse = __commonJS({
|
|
|
23323
23453
|
throw illegal(token3);
|
|
23324
23454
|
}
|
|
23325
23455
|
push(token3);
|
|
23326
|
-
parseField(type, "optional");
|
|
23456
|
+
parseField(type, "optional", void 0, depth + 1);
|
|
23327
23457
|
break;
|
|
23328
23458
|
}
|
|
23329
23459
|
}, "parseType_block"));
|
|
@@ -23333,10 +23463,10 @@ var require_parse = __commonJS({
|
|
|
23333
23463
|
}
|
|
23334
23464
|
}
|
|
23335
23465
|
__name(parseType, "parseType");
|
|
23336
|
-
function parseField(parent, rule, extend) {
|
|
23466
|
+
function parseField(parent, rule, extend, depth) {
|
|
23337
23467
|
var type = next();
|
|
23338
23468
|
if (type === "group") {
|
|
23339
|
-
parseGroup(parent, rule);
|
|
23469
|
+
parseGroup(parent, rule, depth);
|
|
23340
23470
|
return;
|
|
23341
23471
|
}
|
|
23342
23472
|
while (type.endsWith(".") || peek().startsWith(".")) {
|
|
@@ -23372,7 +23502,11 @@ var require_parse = __commonJS({
|
|
|
23372
23502
|
}
|
|
23373
23503
|
}
|
|
23374
23504
|
__name(parseField, "parseField");
|
|
23375
|
-
function parseGroup(parent, rule) {
|
|
23505
|
+
function parseGroup(parent, rule, depth) {
|
|
23506
|
+
if (depth === void 0)
|
|
23507
|
+
depth = 0;
|
|
23508
|
+
if (depth > util.nestingLimit)
|
|
23509
|
+
throw Error("max depth exceeded");
|
|
23376
23510
|
if (edition >= 2023) {
|
|
23377
23511
|
throw illegal("group");
|
|
23378
23512
|
}
|
|
@@ -23396,17 +23530,17 @@ var require_parse = __commonJS({
|
|
|
23396
23530
|
break;
|
|
23397
23531
|
case "required":
|
|
23398
23532
|
case "repeated":
|
|
23399
|
-
parseField(type, token2);
|
|
23533
|
+
parseField(type, token2, void 0, depth + 1);
|
|
23400
23534
|
break;
|
|
23401
23535
|
case "optional":
|
|
23402
23536
|
if (edition === "proto3") {
|
|
23403
|
-
parseField(type, "proto3_optional");
|
|
23537
|
+
parseField(type, "proto3_optional", void 0, depth + 1);
|
|
23404
23538
|
} else {
|
|
23405
|
-
parseField(type, "optional");
|
|
23539
|
+
parseField(type, "optional", void 0, depth + 1);
|
|
23406
23540
|
}
|
|
23407
23541
|
break;
|
|
23408
23542
|
case "message":
|
|
23409
|
-
parseType(type, token2);
|
|
23543
|
+
parseType(type, token2, depth + 1);
|
|
23410
23544
|
break;
|
|
23411
23545
|
case "enum":
|
|
23412
23546
|
parseEnum(type, token2);
|
|
@@ -23449,7 +23583,7 @@ var require_parse = __commonJS({
|
|
|
23449
23583
|
parent.add(field);
|
|
23450
23584
|
}
|
|
23451
23585
|
__name(parseMapField, "parseMapField");
|
|
23452
|
-
function parseOneOf(parent, token2) {
|
|
23586
|
+
function parseOneOf(parent, token2, depth) {
|
|
23453
23587
|
if (!nameRe.test(token2 = next()))
|
|
23454
23588
|
throw illegal(token2, "name");
|
|
23455
23589
|
var oneof = new OneOf(applyCase(token2));
|
|
@@ -23459,7 +23593,7 @@ var require_parse = __commonJS({
|
|
|
23459
23593
|
skip(";");
|
|
23460
23594
|
} else {
|
|
23461
23595
|
push(token3);
|
|
23462
|
-
parseField(oneof, "optional");
|
|
23596
|
+
parseField(oneof, "optional", void 0, depth);
|
|
23463
23597
|
}
|
|
23464
23598
|
}, "parseOneOf_block"));
|
|
23465
23599
|
parent.add(oneof);
|
|
@@ -23551,7 +23685,11 @@ var require_parse = __commonJS({
|
|
|
23551
23685
|
setParsedOption(parent, option, optionValue, propName);
|
|
23552
23686
|
}
|
|
23553
23687
|
__name(parseOption, "parseOption");
|
|
23554
|
-
function parseOptionValue(parent, name) {
|
|
23688
|
+
function parseOptionValue(parent, name, depth) {
|
|
23689
|
+
if (depth === void 0)
|
|
23690
|
+
depth = 0;
|
|
23691
|
+
if (depth > util.recursionLimit)
|
|
23692
|
+
throw Error("max depth exceeded");
|
|
23555
23693
|
if (skip("{", true)) {
|
|
23556
23694
|
var objectResult = {};
|
|
23557
23695
|
while (!skip("}", true)) {
|
|
@@ -23565,7 +23703,7 @@ var require_parse = __commonJS({
|
|
|
23565
23703
|
var propName = token;
|
|
23566
23704
|
skip(":", true);
|
|
23567
23705
|
if (peek() === "{") {
|
|
23568
|
-
value = parseOptionValue(parent, name + "." + token);
|
|
23706
|
+
value = parseOptionValue(parent, name + "." + token, depth + 1);
|
|
23569
23707
|
} else if (peek() === "[") {
|
|
23570
23708
|
value = [];
|
|
23571
23709
|
var lastValue;
|
|
@@ -23586,7 +23724,8 @@ var require_parse = __commonJS({
|
|
|
23586
23724
|
var prevValue = objectResult[propName];
|
|
23587
23725
|
if (prevValue)
|
|
23588
23726
|
value = [].concat(prevValue).concat(value);
|
|
23589
|
-
|
|
23727
|
+
if (propName !== "__proto__")
|
|
23728
|
+
objectResult[propName] = value;
|
|
23590
23729
|
skip(",", true);
|
|
23591
23730
|
skip(";", true);
|
|
23592
23731
|
}
|
|
@@ -23621,12 +23760,16 @@ var require_parse = __commonJS({
|
|
|
23621
23760
|
return parent;
|
|
23622
23761
|
}
|
|
23623
23762
|
__name(parseInlineOptions, "parseInlineOptions");
|
|
23624
|
-
function parseService(parent, token2) {
|
|
23763
|
+
function parseService(parent, token2, depth) {
|
|
23764
|
+
if (depth === void 0)
|
|
23765
|
+
depth = 0;
|
|
23766
|
+
if (depth > util.recursionLimit)
|
|
23767
|
+
throw Error("max depth exceeded");
|
|
23625
23768
|
if (!nameRe.test(token2 = next()))
|
|
23626
23769
|
throw illegal(token2, "service name");
|
|
23627
23770
|
var service = new Service(token2);
|
|
23628
23771
|
ifBlock(service, /* @__PURE__ */ __name(function parseService_block(token3) {
|
|
23629
|
-
if (parseCommon(service, token3)) {
|
|
23772
|
+
if (parseCommon(service, token3, depth)) {
|
|
23630
23773
|
return;
|
|
23631
23774
|
}
|
|
23632
23775
|
if (token3 === "rpc")
|
|
@@ -23673,7 +23816,7 @@ var require_parse = __commonJS({
|
|
|
23673
23816
|
parent.add(method);
|
|
23674
23817
|
}
|
|
23675
23818
|
__name(parseMethod, "parseMethod");
|
|
23676
|
-
function parseExtension(parent, token2) {
|
|
23819
|
+
function parseExtension(parent, token2, depth) {
|
|
23677
23820
|
if (!typeRefRe.test(token2 = next()))
|
|
23678
23821
|
throw illegal(token2, "reference");
|
|
23679
23822
|
var reference = token2;
|
|
@@ -23681,20 +23824,20 @@ var require_parse = __commonJS({
|
|
|
23681
23824
|
switch (token3) {
|
|
23682
23825
|
case "required":
|
|
23683
23826
|
case "repeated":
|
|
23684
|
-
parseField(parent, token3, reference);
|
|
23827
|
+
parseField(parent, token3, reference, depth + 1);
|
|
23685
23828
|
break;
|
|
23686
23829
|
case "optional":
|
|
23687
23830
|
if (edition === "proto3") {
|
|
23688
|
-
parseField(parent, "proto3_optional", reference);
|
|
23831
|
+
parseField(parent, "proto3_optional", reference, depth + 1);
|
|
23689
23832
|
} else {
|
|
23690
|
-
parseField(parent, "optional", reference);
|
|
23833
|
+
parseField(parent, "optional", reference, depth + 1);
|
|
23691
23834
|
}
|
|
23692
23835
|
break;
|
|
23693
23836
|
default:
|
|
23694
23837
|
if (edition === "proto2" || !typeRefRe.test(token3))
|
|
23695
23838
|
throw illegal(token3);
|
|
23696
23839
|
push(token3);
|
|
23697
|
-
parseField(parent, "optional", reference);
|
|
23840
|
+
parseField(parent, "optional", reference, depth + 1);
|
|
23698
23841
|
break;
|
|
23699
23842
|
}
|
|
23700
23843
|
}, "parseExtension_block"));
|
|
@@ -23728,7 +23871,7 @@ var require_parse = __commonJS({
|
|
|
23728
23871
|
skip(";", true);
|
|
23729
23872
|
break;
|
|
23730
23873
|
default:
|
|
23731
|
-
if (parseCommon(ptr, token)) {
|
|
23874
|
+
if (parseCommon(ptr, token, 0)) {
|
|
23732
23875
|
head = false;
|
|
23733
23876
|
continue;
|
|
23734
23877
|
}
|
|
@@ -24698,11 +24841,11 @@ var require_descriptor = __commonJS({
|
|
|
24698
24841
|
42,
|
|
24699
24842
|
42
|
|
24700
24843
|
],
|
|
24701
|
-
"php_generic_services",
|
|
24702
24844
|
[
|
|
24703
24845
|
38,
|
|
24704
24846
|
38
|
|
24705
|
-
]
|
|
24847
|
+
],
|
|
24848
|
+
"php_generic_services"
|
|
24706
24849
|
],
|
|
24707
24850
|
nested: {
|
|
24708
24851
|
OptimizeMode: {
|
|
@@ -25509,6 +25652,9 @@ var require_descriptor2 = __commonJS({
|
|
|
25509
25652
|
var OneOf = $protobuf.OneOf;
|
|
25510
25653
|
var Service = $protobuf.Service;
|
|
25511
25654
|
var Method = $protobuf.Method;
|
|
25655
|
+
var patterns = $protobuf.util.patterns;
|
|
25656
|
+
var numberRe = patterns.numberRe;
|
|
25657
|
+
var typeRefRe = patterns.typeRefRe;
|
|
25512
25658
|
Root.fromDescriptor = /* @__PURE__ */ __name(function fromDescriptor(descriptor) {
|
|
25513
25659
|
if (typeof descriptor.length === "number")
|
|
25514
25660
|
descriptor = exports.FileDescriptorSet.decode(descriptor);
|
|
@@ -25572,7 +25718,11 @@ var require_descriptor2 = __commonJS({
|
|
|
25572
25718
|
}
|
|
25573
25719
|
__name(Root_toDescriptorRecursive, "Root_toDescriptorRecursive");
|
|
25574
25720
|
var unnamedMessageIndex = 0;
|
|
25575
|
-
Type.fromDescriptor = /* @__PURE__ */ __name(function fromDescriptor(descriptor, edition, nested) {
|
|
25721
|
+
Type.fromDescriptor = /* @__PURE__ */ __name(function fromDescriptor(descriptor, edition, nested, depth) {
|
|
25722
|
+
if (depth === void 0)
|
|
25723
|
+
depth = 0;
|
|
25724
|
+
if (depth > $protobuf.util.nestingLimit)
|
|
25725
|
+
throw Error("max depth exceeded");
|
|
25576
25726
|
if (typeof descriptor.length === "number")
|
|
25577
25727
|
descriptor = exports.DescriptorProto.decode(descriptor);
|
|
25578
25728
|
var type = new Type(descriptor.name.length ? descriptor.name : "Type" + unnamedMessageIndex++, fromDescriptorOptions(descriptor.options, exports.MessageOptions)), i;
|
|
@@ -25593,7 +25743,7 @@ var require_descriptor2 = __commonJS({
|
|
|
25593
25743
|
type.add(Field.fromDescriptor(descriptor.extension[i], edition, true));
|
|
25594
25744
|
if (descriptor.nestedType)
|
|
25595
25745
|
for (i = 0; i < descriptor.nestedType.length; ++i) {
|
|
25596
|
-
type.add(Type.fromDescriptor(descriptor.nestedType[i], edition, true));
|
|
25746
|
+
type.add(Type.fromDescriptor(descriptor.nestedType[i], edition, true, depth + 1));
|
|
25597
25747
|
if (descriptor.nestedType[i].options && descriptor.nestedType[i].options.mapEntry)
|
|
25598
25748
|
type.setOption("map_entry", true);
|
|
25599
25749
|
}
|
|
@@ -25658,16 +25808,17 @@ var require_descriptor2 = __commonJS({
|
|
|
25658
25808
|
descriptor.options = toDescriptorOptions(this.options, exports.MessageOptions);
|
|
25659
25809
|
return descriptor;
|
|
25660
25810
|
}, "toDescriptor");
|
|
25661
|
-
var numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;
|
|
25662
25811
|
Field.fromDescriptor = /* @__PURE__ */ __name(function fromDescriptor(descriptor, edition, nested) {
|
|
25663
25812
|
if (typeof descriptor.length === "number")
|
|
25664
25813
|
descriptor = exports.DescriptorProto.decode(descriptor);
|
|
25665
25814
|
if (typeof descriptor.number !== "number")
|
|
25666
25815
|
throw Error("missing field id");
|
|
25667
|
-
var fieldType;
|
|
25668
|
-
if (
|
|
25669
|
-
|
|
25670
|
-
|
|
25816
|
+
var typeName = descriptor.typeName, fieldType;
|
|
25817
|
+
if (typeName != null && typeName !== "") {
|
|
25818
|
+
if (typeof typeName !== "string" || !typeRefRe.test(typeName))
|
|
25819
|
+
throw Error("illegal type name: " + typeName);
|
|
25820
|
+
fieldType = typeName;
|
|
25821
|
+
} else
|
|
25671
25822
|
fieldType = fromDescriptorType(descriptor.type);
|
|
25672
25823
|
var fieldRule;
|
|
25673
25824
|
switch (descriptor.label) {
|
|
@@ -25685,9 +25836,11 @@ var require_descriptor2 = __commonJS({
|
|
|
25685
25836
|
throw Error("illegal label: " + descriptor.label);
|
|
25686
25837
|
}
|
|
25687
25838
|
var extendee = descriptor.extendee;
|
|
25688
|
-
if (
|
|
25689
|
-
|
|
25690
|
-
|
|
25839
|
+
if (extendee != null && extendee !== "") {
|
|
25840
|
+
if (typeof extendee !== "string" || !typeRefRe.test(extendee))
|
|
25841
|
+
throw Error("illegal type name: " + extendee);
|
|
25842
|
+
} else
|
|
25843
|
+
extendee = void 0;
|
|
25691
25844
|
var field = new Field(
|
|
25692
25845
|
descriptor.name.length ? descriptor.name : "field" + descriptor.number,
|
|
25693
25846
|
descriptor.number,
|
|
@@ -25753,7 +25906,7 @@ var require_descriptor2 = __commonJS({
|
|
|
25753
25906
|
}
|
|
25754
25907
|
}
|
|
25755
25908
|
descriptor.extendee = this.extensionField ? this.extensionField.parent.fullName : this.extend;
|
|
25756
|
-
if (this.partOf) {
|
|
25909
|
+
if (this.partOf && this.parent instanceof Type) {
|
|
25757
25910
|
if ((descriptor.oneofIndex = this.parent.oneofsArray.indexOf(this.partOf)) < 0)
|
|
25758
25911
|
throw Error("missing oneof");
|
|
25759
25912
|
}
|
|
@@ -25842,12 +25995,21 @@ var require_descriptor2 = __commonJS({
|
|
|
25842
25995
|
Method.fromDescriptor = /* @__PURE__ */ __name(function fromDescriptor(descriptor) {
|
|
25843
25996
|
if (typeof descriptor.length === "number")
|
|
25844
25997
|
descriptor = exports.MethodDescriptorProto.decode(descriptor);
|
|
25998
|
+
var inputType = descriptor.inputType, outputType = descriptor.outputType;
|
|
25999
|
+
if (inputType != null && inputType !== "") {
|
|
26000
|
+
if (typeof inputType !== "string" || !typeRefRe.test(inputType))
|
|
26001
|
+
throw Error("illegal type name: " + inputType);
|
|
26002
|
+
}
|
|
26003
|
+
if (outputType != null && outputType !== "") {
|
|
26004
|
+
if (typeof outputType !== "string" || !typeRefRe.test(outputType))
|
|
26005
|
+
throw Error("illegal type name: " + outputType);
|
|
26006
|
+
}
|
|
25845
26007
|
return new Method(
|
|
25846
26008
|
// unnamedMethodIndex is global, not per service, because we have no ref to a service here
|
|
25847
26009
|
descriptor.name && descriptor.name.length ? descriptor.name : "Method" + unnamedMethodIndex++,
|
|
25848
26010
|
"rpc",
|
|
25849
|
-
|
|
25850
|
-
|
|
26011
|
+
inputType,
|
|
26012
|
+
outputType,
|
|
25851
26013
|
Boolean(descriptor.clientStreaming),
|
|
25852
26014
|
Boolean(descriptor.serverStreaming),
|
|
25853
26015
|
fromDescriptorOptions(descriptor.options, exports.MethodOptions)
|
|
@@ -26511,994 +26673,6 @@ var require_util2 = __commonJS({
|
|
|
26511
26673
|
}
|
|
26512
26674
|
});
|
|
26513
26675
|
|
|
26514
|
-
// node_modules/long/umd/index.js
|
|
26515
|
-
var require_umd = __commonJS({
|
|
26516
|
-
"node_modules/long/umd/index.js"(exports, module) {
|
|
26517
|
-
init_esbuild_shims();
|
|
26518
|
-
(function(global2, factory) {
|
|
26519
|
-
function preferDefault(exports2) {
|
|
26520
|
-
return exports2.default || exports2;
|
|
26521
|
-
}
|
|
26522
|
-
__name(preferDefault, "preferDefault");
|
|
26523
|
-
if (typeof define === "function" && define.amd) {
|
|
26524
|
-
define([], function() {
|
|
26525
|
-
var exports2 = {};
|
|
26526
|
-
factory(exports2);
|
|
26527
|
-
return preferDefault(exports2);
|
|
26528
|
-
});
|
|
26529
|
-
} else if (typeof exports === "object") {
|
|
26530
|
-
factory(exports);
|
|
26531
|
-
if (typeof module === "object") module.exports = preferDefault(exports);
|
|
26532
|
-
} else {
|
|
26533
|
-
(function() {
|
|
26534
|
-
var exports2 = {};
|
|
26535
|
-
factory(exports2);
|
|
26536
|
-
global2.Long = preferDefault(exports2);
|
|
26537
|
-
})();
|
|
26538
|
-
}
|
|
26539
|
-
})(
|
|
26540
|
-
typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : exports,
|
|
26541
|
-
function(_exports) {
|
|
26542
|
-
"use strict";
|
|
26543
|
-
Object.defineProperty(_exports, "__esModule", {
|
|
26544
|
-
value: true
|
|
26545
|
-
});
|
|
26546
|
-
_exports.default = void 0;
|
|
26547
|
-
var wasm = null;
|
|
26548
|
-
try {
|
|
26549
|
-
wasm = new WebAssembly.Instance(
|
|
26550
|
-
new WebAssembly.Module(
|
|
26551
|
-
new Uint8Array([
|
|
26552
|
-
// \0asm
|
|
26553
|
-
0,
|
|
26554
|
-
97,
|
|
26555
|
-
115,
|
|
26556
|
-
109,
|
|
26557
|
-
// version 1
|
|
26558
|
-
1,
|
|
26559
|
-
0,
|
|
26560
|
-
0,
|
|
26561
|
-
0,
|
|
26562
|
-
// section "type"
|
|
26563
|
-
1,
|
|
26564
|
-
13,
|
|
26565
|
-
2,
|
|
26566
|
-
// 0, () => i32
|
|
26567
|
-
96,
|
|
26568
|
-
0,
|
|
26569
|
-
1,
|
|
26570
|
-
127,
|
|
26571
|
-
// 1, (i32, i32, i32, i32) => i32
|
|
26572
|
-
96,
|
|
26573
|
-
4,
|
|
26574
|
-
127,
|
|
26575
|
-
127,
|
|
26576
|
-
127,
|
|
26577
|
-
127,
|
|
26578
|
-
1,
|
|
26579
|
-
127,
|
|
26580
|
-
// section "function"
|
|
26581
|
-
3,
|
|
26582
|
-
7,
|
|
26583
|
-
6,
|
|
26584
|
-
// 0, type 0
|
|
26585
|
-
0,
|
|
26586
|
-
// 1, type 1
|
|
26587
|
-
1,
|
|
26588
|
-
// 2, type 1
|
|
26589
|
-
1,
|
|
26590
|
-
// 3, type 1
|
|
26591
|
-
1,
|
|
26592
|
-
// 4, type 1
|
|
26593
|
-
1,
|
|
26594
|
-
// 5, type 1
|
|
26595
|
-
1,
|
|
26596
|
-
// section "global"
|
|
26597
|
-
6,
|
|
26598
|
-
6,
|
|
26599
|
-
1,
|
|
26600
|
-
// 0, "high", mutable i32
|
|
26601
|
-
127,
|
|
26602
|
-
1,
|
|
26603
|
-
65,
|
|
26604
|
-
0,
|
|
26605
|
-
11,
|
|
26606
|
-
// section "export"
|
|
26607
|
-
7,
|
|
26608
|
-
50,
|
|
26609
|
-
6,
|
|
26610
|
-
// 0, "mul"
|
|
26611
|
-
3,
|
|
26612
|
-
109,
|
|
26613
|
-
117,
|
|
26614
|
-
108,
|
|
26615
|
-
0,
|
|
26616
|
-
1,
|
|
26617
|
-
// 1, "div_s"
|
|
26618
|
-
5,
|
|
26619
|
-
100,
|
|
26620
|
-
105,
|
|
26621
|
-
118,
|
|
26622
|
-
95,
|
|
26623
|
-
115,
|
|
26624
|
-
0,
|
|
26625
|
-
2,
|
|
26626
|
-
// 2, "div_u"
|
|
26627
|
-
5,
|
|
26628
|
-
100,
|
|
26629
|
-
105,
|
|
26630
|
-
118,
|
|
26631
|
-
95,
|
|
26632
|
-
117,
|
|
26633
|
-
0,
|
|
26634
|
-
3,
|
|
26635
|
-
// 3, "rem_s"
|
|
26636
|
-
5,
|
|
26637
|
-
114,
|
|
26638
|
-
101,
|
|
26639
|
-
109,
|
|
26640
|
-
95,
|
|
26641
|
-
115,
|
|
26642
|
-
0,
|
|
26643
|
-
4,
|
|
26644
|
-
// 4, "rem_u"
|
|
26645
|
-
5,
|
|
26646
|
-
114,
|
|
26647
|
-
101,
|
|
26648
|
-
109,
|
|
26649
|
-
95,
|
|
26650
|
-
117,
|
|
26651
|
-
0,
|
|
26652
|
-
5,
|
|
26653
|
-
// 5, "get_high"
|
|
26654
|
-
8,
|
|
26655
|
-
103,
|
|
26656
|
-
101,
|
|
26657
|
-
116,
|
|
26658
|
-
95,
|
|
26659
|
-
104,
|
|
26660
|
-
105,
|
|
26661
|
-
103,
|
|
26662
|
-
104,
|
|
26663
|
-
0,
|
|
26664
|
-
0,
|
|
26665
|
-
// section "code"
|
|
26666
|
-
10,
|
|
26667
|
-
191,
|
|
26668
|
-
1,
|
|
26669
|
-
6,
|
|
26670
|
-
// 0, "get_high"
|
|
26671
|
-
4,
|
|
26672
|
-
0,
|
|
26673
|
-
35,
|
|
26674
|
-
0,
|
|
26675
|
-
11,
|
|
26676
|
-
// 1, "mul"
|
|
26677
|
-
36,
|
|
26678
|
-
1,
|
|
26679
|
-
1,
|
|
26680
|
-
126,
|
|
26681
|
-
32,
|
|
26682
|
-
0,
|
|
26683
|
-
173,
|
|
26684
|
-
32,
|
|
26685
|
-
1,
|
|
26686
|
-
173,
|
|
26687
|
-
66,
|
|
26688
|
-
32,
|
|
26689
|
-
134,
|
|
26690
|
-
132,
|
|
26691
|
-
32,
|
|
26692
|
-
2,
|
|
26693
|
-
173,
|
|
26694
|
-
32,
|
|
26695
|
-
3,
|
|
26696
|
-
173,
|
|
26697
|
-
66,
|
|
26698
|
-
32,
|
|
26699
|
-
134,
|
|
26700
|
-
132,
|
|
26701
|
-
126,
|
|
26702
|
-
34,
|
|
26703
|
-
4,
|
|
26704
|
-
66,
|
|
26705
|
-
32,
|
|
26706
|
-
135,
|
|
26707
|
-
167,
|
|
26708
|
-
36,
|
|
26709
|
-
0,
|
|
26710
|
-
32,
|
|
26711
|
-
4,
|
|
26712
|
-
167,
|
|
26713
|
-
11,
|
|
26714
|
-
// 2, "div_s"
|
|
26715
|
-
36,
|
|
26716
|
-
1,
|
|
26717
|
-
1,
|
|
26718
|
-
126,
|
|
26719
|
-
32,
|
|
26720
|
-
0,
|
|
26721
|
-
173,
|
|
26722
|
-
32,
|
|
26723
|
-
1,
|
|
26724
|
-
173,
|
|
26725
|
-
66,
|
|
26726
|
-
32,
|
|
26727
|
-
134,
|
|
26728
|
-
132,
|
|
26729
|
-
32,
|
|
26730
|
-
2,
|
|
26731
|
-
173,
|
|
26732
|
-
32,
|
|
26733
|
-
3,
|
|
26734
|
-
173,
|
|
26735
|
-
66,
|
|
26736
|
-
32,
|
|
26737
|
-
134,
|
|
26738
|
-
132,
|
|
26739
|
-
127,
|
|
26740
|
-
34,
|
|
26741
|
-
4,
|
|
26742
|
-
66,
|
|
26743
|
-
32,
|
|
26744
|
-
135,
|
|
26745
|
-
167,
|
|
26746
|
-
36,
|
|
26747
|
-
0,
|
|
26748
|
-
32,
|
|
26749
|
-
4,
|
|
26750
|
-
167,
|
|
26751
|
-
11,
|
|
26752
|
-
// 3, "div_u"
|
|
26753
|
-
36,
|
|
26754
|
-
1,
|
|
26755
|
-
1,
|
|
26756
|
-
126,
|
|
26757
|
-
32,
|
|
26758
|
-
0,
|
|
26759
|
-
173,
|
|
26760
|
-
32,
|
|
26761
|
-
1,
|
|
26762
|
-
173,
|
|
26763
|
-
66,
|
|
26764
|
-
32,
|
|
26765
|
-
134,
|
|
26766
|
-
132,
|
|
26767
|
-
32,
|
|
26768
|
-
2,
|
|
26769
|
-
173,
|
|
26770
|
-
32,
|
|
26771
|
-
3,
|
|
26772
|
-
173,
|
|
26773
|
-
66,
|
|
26774
|
-
32,
|
|
26775
|
-
134,
|
|
26776
|
-
132,
|
|
26777
|
-
128,
|
|
26778
|
-
34,
|
|
26779
|
-
4,
|
|
26780
|
-
66,
|
|
26781
|
-
32,
|
|
26782
|
-
135,
|
|
26783
|
-
167,
|
|
26784
|
-
36,
|
|
26785
|
-
0,
|
|
26786
|
-
32,
|
|
26787
|
-
4,
|
|
26788
|
-
167,
|
|
26789
|
-
11,
|
|
26790
|
-
// 4, "rem_s"
|
|
26791
|
-
36,
|
|
26792
|
-
1,
|
|
26793
|
-
1,
|
|
26794
|
-
126,
|
|
26795
|
-
32,
|
|
26796
|
-
0,
|
|
26797
|
-
173,
|
|
26798
|
-
32,
|
|
26799
|
-
1,
|
|
26800
|
-
173,
|
|
26801
|
-
66,
|
|
26802
|
-
32,
|
|
26803
|
-
134,
|
|
26804
|
-
132,
|
|
26805
|
-
32,
|
|
26806
|
-
2,
|
|
26807
|
-
173,
|
|
26808
|
-
32,
|
|
26809
|
-
3,
|
|
26810
|
-
173,
|
|
26811
|
-
66,
|
|
26812
|
-
32,
|
|
26813
|
-
134,
|
|
26814
|
-
132,
|
|
26815
|
-
129,
|
|
26816
|
-
34,
|
|
26817
|
-
4,
|
|
26818
|
-
66,
|
|
26819
|
-
32,
|
|
26820
|
-
135,
|
|
26821
|
-
167,
|
|
26822
|
-
36,
|
|
26823
|
-
0,
|
|
26824
|
-
32,
|
|
26825
|
-
4,
|
|
26826
|
-
167,
|
|
26827
|
-
11,
|
|
26828
|
-
// 5, "rem_u"
|
|
26829
|
-
36,
|
|
26830
|
-
1,
|
|
26831
|
-
1,
|
|
26832
|
-
126,
|
|
26833
|
-
32,
|
|
26834
|
-
0,
|
|
26835
|
-
173,
|
|
26836
|
-
32,
|
|
26837
|
-
1,
|
|
26838
|
-
173,
|
|
26839
|
-
66,
|
|
26840
|
-
32,
|
|
26841
|
-
134,
|
|
26842
|
-
132,
|
|
26843
|
-
32,
|
|
26844
|
-
2,
|
|
26845
|
-
173,
|
|
26846
|
-
32,
|
|
26847
|
-
3,
|
|
26848
|
-
173,
|
|
26849
|
-
66,
|
|
26850
|
-
32,
|
|
26851
|
-
134,
|
|
26852
|
-
132,
|
|
26853
|
-
130,
|
|
26854
|
-
34,
|
|
26855
|
-
4,
|
|
26856
|
-
66,
|
|
26857
|
-
32,
|
|
26858
|
-
135,
|
|
26859
|
-
167,
|
|
26860
|
-
36,
|
|
26861
|
-
0,
|
|
26862
|
-
32,
|
|
26863
|
-
4,
|
|
26864
|
-
167,
|
|
26865
|
-
11
|
|
26866
|
-
])
|
|
26867
|
-
),
|
|
26868
|
-
{}
|
|
26869
|
-
).exports;
|
|
26870
|
-
} catch {
|
|
26871
|
-
}
|
|
26872
|
-
function Long(low, high, unsigned) {
|
|
26873
|
-
this.low = low | 0;
|
|
26874
|
-
this.high = high | 0;
|
|
26875
|
-
this.unsigned = !!unsigned;
|
|
26876
|
-
}
|
|
26877
|
-
__name(Long, "Long");
|
|
26878
|
-
Long.prototype.__isLong__;
|
|
26879
|
-
Object.defineProperty(Long.prototype, "__isLong__", {
|
|
26880
|
-
value: true
|
|
26881
|
-
});
|
|
26882
|
-
function isLong(obj) {
|
|
26883
|
-
return (obj && obj["__isLong__"]) === true;
|
|
26884
|
-
}
|
|
26885
|
-
__name(isLong, "isLong");
|
|
26886
|
-
function ctz32(value) {
|
|
26887
|
-
var c = Math.clz32(value & -value);
|
|
26888
|
-
return value ? 31 - c : c;
|
|
26889
|
-
}
|
|
26890
|
-
__name(ctz32, "ctz32");
|
|
26891
|
-
Long.isLong = isLong;
|
|
26892
|
-
var INT_CACHE = {};
|
|
26893
|
-
var UINT_CACHE = {};
|
|
26894
|
-
function fromInt(value, unsigned) {
|
|
26895
|
-
var obj, cachedObj, cache;
|
|
26896
|
-
if (unsigned) {
|
|
26897
|
-
value >>>= 0;
|
|
26898
|
-
if (cache = 0 <= value && value < 256) {
|
|
26899
|
-
cachedObj = UINT_CACHE[value];
|
|
26900
|
-
if (cachedObj) return cachedObj;
|
|
26901
|
-
}
|
|
26902
|
-
obj = fromBits(value, 0, true);
|
|
26903
|
-
if (cache) UINT_CACHE[value] = obj;
|
|
26904
|
-
return obj;
|
|
26905
|
-
} else {
|
|
26906
|
-
value |= 0;
|
|
26907
|
-
if (cache = -128 <= value && value < 128) {
|
|
26908
|
-
cachedObj = INT_CACHE[value];
|
|
26909
|
-
if (cachedObj) return cachedObj;
|
|
26910
|
-
}
|
|
26911
|
-
obj = fromBits(value, value < 0 ? -1 : 0, false);
|
|
26912
|
-
if (cache) INT_CACHE[value] = obj;
|
|
26913
|
-
return obj;
|
|
26914
|
-
}
|
|
26915
|
-
}
|
|
26916
|
-
__name(fromInt, "fromInt");
|
|
26917
|
-
Long.fromInt = fromInt;
|
|
26918
|
-
function fromNumber(value, unsigned) {
|
|
26919
|
-
if (isNaN(value)) return unsigned ? UZERO : ZERO;
|
|
26920
|
-
if (unsigned) {
|
|
26921
|
-
if (value < 0) return UZERO;
|
|
26922
|
-
if (value >= TWO_PWR_64_DBL) return MAX_UNSIGNED_VALUE;
|
|
26923
|
-
} else {
|
|
26924
|
-
if (value <= -TWO_PWR_63_DBL) return MIN_VALUE;
|
|
26925
|
-
if (value + 1 >= TWO_PWR_63_DBL) return MAX_VALUE;
|
|
26926
|
-
}
|
|
26927
|
-
if (value < 0) return fromNumber(-value, unsigned).neg();
|
|
26928
|
-
return fromBits(
|
|
26929
|
-
value % TWO_PWR_32_DBL | 0,
|
|
26930
|
-
value / TWO_PWR_32_DBL | 0,
|
|
26931
|
-
unsigned
|
|
26932
|
-
);
|
|
26933
|
-
}
|
|
26934
|
-
__name(fromNumber, "fromNumber");
|
|
26935
|
-
Long.fromNumber = fromNumber;
|
|
26936
|
-
function fromBits(lowBits, highBits, unsigned) {
|
|
26937
|
-
return new Long(lowBits, highBits, unsigned);
|
|
26938
|
-
}
|
|
26939
|
-
__name(fromBits, "fromBits");
|
|
26940
|
-
Long.fromBits = fromBits;
|
|
26941
|
-
var pow_dbl = Math.pow;
|
|
26942
|
-
function fromString(str, unsigned, radix) {
|
|
26943
|
-
if (str.length === 0) throw Error("empty string");
|
|
26944
|
-
if (typeof unsigned === "number") {
|
|
26945
|
-
radix = unsigned;
|
|
26946
|
-
unsigned = false;
|
|
26947
|
-
} else {
|
|
26948
|
-
unsigned = !!unsigned;
|
|
26949
|
-
}
|
|
26950
|
-
if (str === "NaN" || str === "Infinity" || str === "+Infinity" || str === "-Infinity")
|
|
26951
|
-
return unsigned ? UZERO : ZERO;
|
|
26952
|
-
radix = radix || 10;
|
|
26953
|
-
if (radix < 2 || 36 < radix) throw RangeError("radix");
|
|
26954
|
-
var p;
|
|
26955
|
-
if ((p = str.indexOf("-")) > 0) throw Error("interior hyphen");
|
|
26956
|
-
else if (p === 0) {
|
|
26957
|
-
return fromString(str.substring(1), unsigned, radix).neg();
|
|
26958
|
-
}
|
|
26959
|
-
var radixToPower = fromNumber(pow_dbl(radix, 8));
|
|
26960
|
-
var result = ZERO;
|
|
26961
|
-
for (var i = 0; i < str.length; i += 8) {
|
|
26962
|
-
var size = Math.min(8, str.length - i), value = parseInt(str.substring(i, i + size), radix);
|
|
26963
|
-
if (size < 8) {
|
|
26964
|
-
var power = fromNumber(pow_dbl(radix, size));
|
|
26965
|
-
result = result.mul(power).add(fromNumber(value));
|
|
26966
|
-
} else {
|
|
26967
|
-
result = result.mul(radixToPower);
|
|
26968
|
-
result = result.add(fromNumber(value));
|
|
26969
|
-
}
|
|
26970
|
-
}
|
|
26971
|
-
result.unsigned = unsigned;
|
|
26972
|
-
return result;
|
|
26973
|
-
}
|
|
26974
|
-
__name(fromString, "fromString");
|
|
26975
|
-
Long.fromString = fromString;
|
|
26976
|
-
function fromValue(val, unsigned) {
|
|
26977
|
-
if (typeof val === "number") return fromNumber(val, unsigned);
|
|
26978
|
-
if (typeof val === "string") return fromString(val, unsigned);
|
|
26979
|
-
return fromBits(
|
|
26980
|
-
val.low,
|
|
26981
|
-
val.high,
|
|
26982
|
-
typeof unsigned === "boolean" ? unsigned : val.unsigned
|
|
26983
|
-
);
|
|
26984
|
-
}
|
|
26985
|
-
__name(fromValue, "fromValue");
|
|
26986
|
-
Long.fromValue = fromValue;
|
|
26987
|
-
var TWO_PWR_16_DBL = 1 << 16;
|
|
26988
|
-
var TWO_PWR_24_DBL = 1 << 24;
|
|
26989
|
-
var TWO_PWR_32_DBL = TWO_PWR_16_DBL * TWO_PWR_16_DBL;
|
|
26990
|
-
var TWO_PWR_64_DBL = TWO_PWR_32_DBL * TWO_PWR_32_DBL;
|
|
26991
|
-
var TWO_PWR_63_DBL = TWO_PWR_64_DBL / 2;
|
|
26992
|
-
var TWO_PWR_24 = fromInt(TWO_PWR_24_DBL);
|
|
26993
|
-
var ZERO = fromInt(0);
|
|
26994
|
-
Long.ZERO = ZERO;
|
|
26995
|
-
var UZERO = fromInt(0, true);
|
|
26996
|
-
Long.UZERO = UZERO;
|
|
26997
|
-
var ONE = fromInt(1);
|
|
26998
|
-
Long.ONE = ONE;
|
|
26999
|
-
var UONE = fromInt(1, true);
|
|
27000
|
-
Long.UONE = UONE;
|
|
27001
|
-
var NEG_ONE = fromInt(-1);
|
|
27002
|
-
Long.NEG_ONE = NEG_ONE;
|
|
27003
|
-
var MAX_VALUE = fromBits(4294967295 | 0, 2147483647 | 0, false);
|
|
27004
|
-
Long.MAX_VALUE = MAX_VALUE;
|
|
27005
|
-
var MAX_UNSIGNED_VALUE = fromBits(4294967295 | 0, 4294967295 | 0, true);
|
|
27006
|
-
Long.MAX_UNSIGNED_VALUE = MAX_UNSIGNED_VALUE;
|
|
27007
|
-
var MIN_VALUE = fromBits(0, 2147483648 | 0, false);
|
|
27008
|
-
Long.MIN_VALUE = MIN_VALUE;
|
|
27009
|
-
var LongPrototype = Long.prototype;
|
|
27010
|
-
LongPrototype.toInt = /* @__PURE__ */ __name(function toInt() {
|
|
27011
|
-
return this.unsigned ? this.low >>> 0 : this.low;
|
|
27012
|
-
}, "toInt");
|
|
27013
|
-
LongPrototype.toNumber = /* @__PURE__ */ __name(function toNumber() {
|
|
27014
|
-
if (this.unsigned)
|
|
27015
|
-
return (this.high >>> 0) * TWO_PWR_32_DBL + (this.low >>> 0);
|
|
27016
|
-
return this.high * TWO_PWR_32_DBL + (this.low >>> 0);
|
|
27017
|
-
}, "toNumber");
|
|
27018
|
-
LongPrototype.toString = /* @__PURE__ */ __name(function toString(radix) {
|
|
27019
|
-
radix = radix || 10;
|
|
27020
|
-
if (radix < 2 || 36 < radix) throw RangeError("radix");
|
|
27021
|
-
if (this.isZero()) return "0";
|
|
27022
|
-
if (this.isNegative()) {
|
|
27023
|
-
if (this.eq(MIN_VALUE)) {
|
|
27024
|
-
var radixLong = fromNumber(radix), div = this.div(radixLong), rem1 = div.mul(radixLong).sub(this);
|
|
27025
|
-
return div.toString(radix) + rem1.toInt().toString(radix);
|
|
27026
|
-
} else return "-" + this.neg().toString(radix);
|
|
27027
|
-
}
|
|
27028
|
-
var radixToPower = fromNumber(pow_dbl(radix, 6), this.unsigned), rem = this;
|
|
27029
|
-
var result = "";
|
|
27030
|
-
while (true) {
|
|
27031
|
-
var remDiv = rem.div(radixToPower), intval = rem.sub(remDiv.mul(radixToPower)).toInt() >>> 0, digits = intval.toString(radix);
|
|
27032
|
-
rem = remDiv;
|
|
27033
|
-
if (rem.isZero()) return digits + result;
|
|
27034
|
-
else {
|
|
27035
|
-
while (digits.length < 6) digits = "0" + digits;
|
|
27036
|
-
result = "" + digits + result;
|
|
27037
|
-
}
|
|
27038
|
-
}
|
|
27039
|
-
}, "toString");
|
|
27040
|
-
LongPrototype.getHighBits = /* @__PURE__ */ __name(function getHighBits() {
|
|
27041
|
-
return this.high;
|
|
27042
|
-
}, "getHighBits");
|
|
27043
|
-
LongPrototype.getHighBitsUnsigned = /* @__PURE__ */ __name(function getHighBitsUnsigned() {
|
|
27044
|
-
return this.high >>> 0;
|
|
27045
|
-
}, "getHighBitsUnsigned");
|
|
27046
|
-
LongPrototype.getLowBits = /* @__PURE__ */ __name(function getLowBits() {
|
|
27047
|
-
return this.low;
|
|
27048
|
-
}, "getLowBits");
|
|
27049
|
-
LongPrototype.getLowBitsUnsigned = /* @__PURE__ */ __name(function getLowBitsUnsigned() {
|
|
27050
|
-
return this.low >>> 0;
|
|
27051
|
-
}, "getLowBitsUnsigned");
|
|
27052
|
-
LongPrototype.getNumBitsAbs = /* @__PURE__ */ __name(function getNumBitsAbs() {
|
|
27053
|
-
if (this.isNegative())
|
|
27054
|
-
return this.eq(MIN_VALUE) ? 64 : this.neg().getNumBitsAbs();
|
|
27055
|
-
var val = this.high != 0 ? this.high : this.low;
|
|
27056
|
-
for (var bit = 31; bit > 0; bit--) if ((val & 1 << bit) != 0) break;
|
|
27057
|
-
return this.high != 0 ? bit + 33 : bit + 1;
|
|
27058
|
-
}, "getNumBitsAbs");
|
|
27059
|
-
LongPrototype.isSafeInteger = /* @__PURE__ */ __name(function isSafeInteger() {
|
|
27060
|
-
var top11Bits = this.high >> 21;
|
|
27061
|
-
if (!top11Bits) return true;
|
|
27062
|
-
if (this.unsigned) return false;
|
|
27063
|
-
return top11Bits === -1 && !(this.low === 0 && this.high === -2097152);
|
|
27064
|
-
}, "isSafeInteger");
|
|
27065
|
-
LongPrototype.isZero = /* @__PURE__ */ __name(function isZero() {
|
|
27066
|
-
return this.high === 0 && this.low === 0;
|
|
27067
|
-
}, "isZero");
|
|
27068
|
-
LongPrototype.eqz = LongPrototype.isZero;
|
|
27069
|
-
LongPrototype.isNegative = /* @__PURE__ */ __name(function isNegative() {
|
|
27070
|
-
return !this.unsigned && this.high < 0;
|
|
27071
|
-
}, "isNegative");
|
|
27072
|
-
LongPrototype.isPositive = /* @__PURE__ */ __name(function isPositive() {
|
|
27073
|
-
return this.unsigned || this.high >= 0;
|
|
27074
|
-
}, "isPositive");
|
|
27075
|
-
LongPrototype.isOdd = /* @__PURE__ */ __name(function isOdd() {
|
|
27076
|
-
return (this.low & 1) === 1;
|
|
27077
|
-
}, "isOdd");
|
|
27078
|
-
LongPrototype.isEven = /* @__PURE__ */ __name(function isEven() {
|
|
27079
|
-
return (this.low & 1) === 0;
|
|
27080
|
-
}, "isEven");
|
|
27081
|
-
LongPrototype.equals = /* @__PURE__ */ __name(function equals(other) {
|
|
27082
|
-
if (!isLong(other)) other = fromValue(other);
|
|
27083
|
-
if (this.unsigned !== other.unsigned && this.high >>> 31 === 1 && other.high >>> 31 === 1)
|
|
27084
|
-
return false;
|
|
27085
|
-
return this.high === other.high && this.low === other.low;
|
|
27086
|
-
}, "equals");
|
|
27087
|
-
LongPrototype.eq = LongPrototype.equals;
|
|
27088
|
-
LongPrototype.notEquals = /* @__PURE__ */ __name(function notEquals(other) {
|
|
27089
|
-
return !this.eq(
|
|
27090
|
-
/* validates */
|
|
27091
|
-
other
|
|
27092
|
-
);
|
|
27093
|
-
}, "notEquals");
|
|
27094
|
-
LongPrototype.neq = LongPrototype.notEquals;
|
|
27095
|
-
LongPrototype.ne = LongPrototype.notEquals;
|
|
27096
|
-
LongPrototype.lessThan = /* @__PURE__ */ __name(function lessThan(other) {
|
|
27097
|
-
return this.comp(
|
|
27098
|
-
/* validates */
|
|
27099
|
-
other
|
|
27100
|
-
) < 0;
|
|
27101
|
-
}, "lessThan");
|
|
27102
|
-
LongPrototype.lt = LongPrototype.lessThan;
|
|
27103
|
-
LongPrototype.lessThanOrEqual = /* @__PURE__ */ __name(function lessThanOrEqual(other) {
|
|
27104
|
-
return this.comp(
|
|
27105
|
-
/* validates */
|
|
27106
|
-
other
|
|
27107
|
-
) <= 0;
|
|
27108
|
-
}, "lessThanOrEqual");
|
|
27109
|
-
LongPrototype.lte = LongPrototype.lessThanOrEqual;
|
|
27110
|
-
LongPrototype.le = LongPrototype.lessThanOrEqual;
|
|
27111
|
-
LongPrototype.greaterThan = /* @__PURE__ */ __name(function greaterThan(other) {
|
|
27112
|
-
return this.comp(
|
|
27113
|
-
/* validates */
|
|
27114
|
-
other
|
|
27115
|
-
) > 0;
|
|
27116
|
-
}, "greaterThan");
|
|
27117
|
-
LongPrototype.gt = LongPrototype.greaterThan;
|
|
27118
|
-
LongPrototype.greaterThanOrEqual = /* @__PURE__ */ __name(function greaterThanOrEqual(other) {
|
|
27119
|
-
return this.comp(
|
|
27120
|
-
/* validates */
|
|
27121
|
-
other
|
|
27122
|
-
) >= 0;
|
|
27123
|
-
}, "greaterThanOrEqual");
|
|
27124
|
-
LongPrototype.gte = LongPrototype.greaterThanOrEqual;
|
|
27125
|
-
LongPrototype.ge = LongPrototype.greaterThanOrEqual;
|
|
27126
|
-
LongPrototype.compare = /* @__PURE__ */ __name(function compare(other) {
|
|
27127
|
-
if (!isLong(other)) other = fromValue(other);
|
|
27128
|
-
if (this.eq(other)) return 0;
|
|
27129
|
-
var thisNeg = this.isNegative(), otherNeg = other.isNegative();
|
|
27130
|
-
if (thisNeg && !otherNeg) return -1;
|
|
27131
|
-
if (!thisNeg && otherNeg) return 1;
|
|
27132
|
-
if (!this.unsigned) return this.sub(other).isNegative() ? -1 : 1;
|
|
27133
|
-
return other.high >>> 0 > this.high >>> 0 || other.high === this.high && other.low >>> 0 > this.low >>> 0 ? -1 : 1;
|
|
27134
|
-
}, "compare");
|
|
27135
|
-
LongPrototype.comp = LongPrototype.compare;
|
|
27136
|
-
LongPrototype.negate = /* @__PURE__ */ __name(function negate() {
|
|
27137
|
-
if (!this.unsigned && this.eq(MIN_VALUE)) return MIN_VALUE;
|
|
27138
|
-
return this.not().add(ONE);
|
|
27139
|
-
}, "negate");
|
|
27140
|
-
LongPrototype.neg = LongPrototype.negate;
|
|
27141
|
-
LongPrototype.add = /* @__PURE__ */ __name(function add(addend) {
|
|
27142
|
-
if (!isLong(addend)) addend = fromValue(addend);
|
|
27143
|
-
var a48 = this.high >>> 16;
|
|
27144
|
-
var a32 = this.high & 65535;
|
|
27145
|
-
var a16 = this.low >>> 16;
|
|
27146
|
-
var a00 = this.low & 65535;
|
|
27147
|
-
var b48 = addend.high >>> 16;
|
|
27148
|
-
var b32 = addend.high & 65535;
|
|
27149
|
-
var b16 = addend.low >>> 16;
|
|
27150
|
-
var b00 = addend.low & 65535;
|
|
27151
|
-
var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
|
|
27152
|
-
c00 += a00 + b00;
|
|
27153
|
-
c16 += c00 >>> 16;
|
|
27154
|
-
c00 &= 65535;
|
|
27155
|
-
c16 += a16 + b16;
|
|
27156
|
-
c32 += c16 >>> 16;
|
|
27157
|
-
c16 &= 65535;
|
|
27158
|
-
c32 += a32 + b32;
|
|
27159
|
-
c48 += c32 >>> 16;
|
|
27160
|
-
c32 &= 65535;
|
|
27161
|
-
c48 += a48 + b48;
|
|
27162
|
-
c48 &= 65535;
|
|
27163
|
-
return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
|
|
27164
|
-
}, "add");
|
|
27165
|
-
LongPrototype.subtract = /* @__PURE__ */ __name(function subtract(subtrahend) {
|
|
27166
|
-
if (!isLong(subtrahend)) subtrahend = fromValue(subtrahend);
|
|
27167
|
-
return this.add(subtrahend.neg());
|
|
27168
|
-
}, "subtract");
|
|
27169
|
-
LongPrototype.sub = LongPrototype.subtract;
|
|
27170
|
-
LongPrototype.multiply = /* @__PURE__ */ __name(function multiply(multiplier) {
|
|
27171
|
-
if (this.isZero()) return this;
|
|
27172
|
-
if (!isLong(multiplier)) multiplier = fromValue(multiplier);
|
|
27173
|
-
if (wasm) {
|
|
27174
|
-
var low = wasm["mul"](
|
|
27175
|
-
this.low,
|
|
27176
|
-
this.high,
|
|
27177
|
-
multiplier.low,
|
|
27178
|
-
multiplier.high
|
|
27179
|
-
);
|
|
27180
|
-
return fromBits(low, wasm["get_high"](), this.unsigned);
|
|
27181
|
-
}
|
|
27182
|
-
if (multiplier.isZero()) return this.unsigned ? UZERO : ZERO;
|
|
27183
|
-
if (this.eq(MIN_VALUE)) return multiplier.isOdd() ? MIN_VALUE : ZERO;
|
|
27184
|
-
if (multiplier.eq(MIN_VALUE)) return this.isOdd() ? MIN_VALUE : ZERO;
|
|
27185
|
-
if (this.isNegative()) {
|
|
27186
|
-
if (multiplier.isNegative()) return this.neg().mul(multiplier.neg());
|
|
27187
|
-
else return this.neg().mul(multiplier).neg();
|
|
27188
|
-
} else if (multiplier.isNegative())
|
|
27189
|
-
return this.mul(multiplier.neg()).neg();
|
|
27190
|
-
if (this.lt(TWO_PWR_24) && multiplier.lt(TWO_PWR_24))
|
|
27191
|
-
return fromNumber(
|
|
27192
|
-
this.toNumber() * multiplier.toNumber(),
|
|
27193
|
-
this.unsigned
|
|
27194
|
-
);
|
|
27195
|
-
var a48 = this.high >>> 16;
|
|
27196
|
-
var a32 = this.high & 65535;
|
|
27197
|
-
var a16 = this.low >>> 16;
|
|
27198
|
-
var a00 = this.low & 65535;
|
|
27199
|
-
var b48 = multiplier.high >>> 16;
|
|
27200
|
-
var b32 = multiplier.high & 65535;
|
|
27201
|
-
var b16 = multiplier.low >>> 16;
|
|
27202
|
-
var b00 = multiplier.low & 65535;
|
|
27203
|
-
var c48 = 0, c32 = 0, c16 = 0, c00 = 0;
|
|
27204
|
-
c00 += a00 * b00;
|
|
27205
|
-
c16 += c00 >>> 16;
|
|
27206
|
-
c00 &= 65535;
|
|
27207
|
-
c16 += a16 * b00;
|
|
27208
|
-
c32 += c16 >>> 16;
|
|
27209
|
-
c16 &= 65535;
|
|
27210
|
-
c16 += a00 * b16;
|
|
27211
|
-
c32 += c16 >>> 16;
|
|
27212
|
-
c16 &= 65535;
|
|
27213
|
-
c32 += a32 * b00;
|
|
27214
|
-
c48 += c32 >>> 16;
|
|
27215
|
-
c32 &= 65535;
|
|
27216
|
-
c32 += a16 * b16;
|
|
27217
|
-
c48 += c32 >>> 16;
|
|
27218
|
-
c32 &= 65535;
|
|
27219
|
-
c32 += a00 * b32;
|
|
27220
|
-
c48 += c32 >>> 16;
|
|
27221
|
-
c32 &= 65535;
|
|
27222
|
-
c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48;
|
|
27223
|
-
c48 &= 65535;
|
|
27224
|
-
return fromBits(c16 << 16 | c00, c48 << 16 | c32, this.unsigned);
|
|
27225
|
-
}, "multiply");
|
|
27226
|
-
LongPrototype.mul = LongPrototype.multiply;
|
|
27227
|
-
LongPrototype.divide = /* @__PURE__ */ __name(function divide(divisor) {
|
|
27228
|
-
if (!isLong(divisor)) divisor = fromValue(divisor);
|
|
27229
|
-
if (divisor.isZero()) throw Error("division by zero");
|
|
27230
|
-
if (wasm) {
|
|
27231
|
-
if (!this.unsigned && this.high === -2147483648 && divisor.low === -1 && divisor.high === -1) {
|
|
27232
|
-
return this;
|
|
27233
|
-
}
|
|
27234
|
-
var low = (this.unsigned ? wasm["div_u"] : wasm["div_s"])(
|
|
27235
|
-
this.low,
|
|
27236
|
-
this.high,
|
|
27237
|
-
divisor.low,
|
|
27238
|
-
divisor.high
|
|
27239
|
-
);
|
|
27240
|
-
return fromBits(low, wasm["get_high"](), this.unsigned);
|
|
27241
|
-
}
|
|
27242
|
-
if (this.isZero()) return this.unsigned ? UZERO : ZERO;
|
|
27243
|
-
var approx, rem, res;
|
|
27244
|
-
if (!this.unsigned) {
|
|
27245
|
-
if (this.eq(MIN_VALUE)) {
|
|
27246
|
-
if (divisor.eq(ONE) || divisor.eq(NEG_ONE))
|
|
27247
|
-
return MIN_VALUE;
|
|
27248
|
-
else if (divisor.eq(MIN_VALUE)) return ONE;
|
|
27249
|
-
else {
|
|
27250
|
-
var halfThis = this.shr(1);
|
|
27251
|
-
approx = halfThis.div(divisor).shl(1);
|
|
27252
|
-
if (approx.eq(ZERO)) {
|
|
27253
|
-
return divisor.isNegative() ? ONE : NEG_ONE;
|
|
27254
|
-
} else {
|
|
27255
|
-
rem = this.sub(divisor.mul(approx));
|
|
27256
|
-
res = approx.add(rem.div(divisor));
|
|
27257
|
-
return res;
|
|
27258
|
-
}
|
|
27259
|
-
}
|
|
27260
|
-
} else if (divisor.eq(MIN_VALUE)) return this.unsigned ? UZERO : ZERO;
|
|
27261
|
-
if (this.isNegative()) {
|
|
27262
|
-
if (divisor.isNegative()) return this.neg().div(divisor.neg());
|
|
27263
|
-
return this.neg().div(divisor).neg();
|
|
27264
|
-
} else if (divisor.isNegative()) return this.div(divisor.neg()).neg();
|
|
27265
|
-
res = ZERO;
|
|
27266
|
-
} else {
|
|
27267
|
-
if (!divisor.unsigned) divisor = divisor.toUnsigned();
|
|
27268
|
-
if (divisor.gt(this)) return UZERO;
|
|
27269
|
-
if (divisor.gt(this.shru(1)))
|
|
27270
|
-
return UONE;
|
|
27271
|
-
res = UZERO;
|
|
27272
|
-
}
|
|
27273
|
-
rem = this;
|
|
27274
|
-
while (rem.gte(divisor)) {
|
|
27275
|
-
approx = Math.max(1, Math.floor(rem.toNumber() / divisor.toNumber()));
|
|
27276
|
-
var log2 = Math.ceil(Math.log(approx) / Math.LN2), delta = log2 <= 48 ? 1 : pow_dbl(2, log2 - 48), approxRes = fromNumber(approx), approxRem = approxRes.mul(divisor);
|
|
27277
|
-
while (approxRem.isNegative() || approxRem.gt(rem)) {
|
|
27278
|
-
approx -= delta;
|
|
27279
|
-
approxRes = fromNumber(approx, this.unsigned);
|
|
27280
|
-
approxRem = approxRes.mul(divisor);
|
|
27281
|
-
}
|
|
27282
|
-
if (approxRes.isZero()) approxRes = ONE;
|
|
27283
|
-
res = res.add(approxRes);
|
|
27284
|
-
rem = rem.sub(approxRem);
|
|
27285
|
-
}
|
|
27286
|
-
return res;
|
|
27287
|
-
}, "divide");
|
|
27288
|
-
LongPrototype.div = LongPrototype.divide;
|
|
27289
|
-
LongPrototype.modulo = /* @__PURE__ */ __name(function modulo(divisor) {
|
|
27290
|
-
if (!isLong(divisor)) divisor = fromValue(divisor);
|
|
27291
|
-
if (wasm) {
|
|
27292
|
-
var low = (this.unsigned ? wasm["rem_u"] : wasm["rem_s"])(
|
|
27293
|
-
this.low,
|
|
27294
|
-
this.high,
|
|
27295
|
-
divisor.low,
|
|
27296
|
-
divisor.high
|
|
27297
|
-
);
|
|
27298
|
-
return fromBits(low, wasm["get_high"](), this.unsigned);
|
|
27299
|
-
}
|
|
27300
|
-
return this.sub(this.div(divisor).mul(divisor));
|
|
27301
|
-
}, "modulo");
|
|
27302
|
-
LongPrototype.mod = LongPrototype.modulo;
|
|
27303
|
-
LongPrototype.rem = LongPrototype.modulo;
|
|
27304
|
-
LongPrototype.not = /* @__PURE__ */ __name(function not() {
|
|
27305
|
-
return fromBits(~this.low, ~this.high, this.unsigned);
|
|
27306
|
-
}, "not");
|
|
27307
|
-
LongPrototype.countLeadingZeros = /* @__PURE__ */ __name(function countLeadingZeros() {
|
|
27308
|
-
return this.high ? Math.clz32(this.high) : Math.clz32(this.low) + 32;
|
|
27309
|
-
}, "countLeadingZeros");
|
|
27310
|
-
LongPrototype.clz = LongPrototype.countLeadingZeros;
|
|
27311
|
-
LongPrototype.countTrailingZeros = /* @__PURE__ */ __name(function countTrailingZeros() {
|
|
27312
|
-
return this.low ? ctz32(this.low) : ctz32(this.high) + 32;
|
|
27313
|
-
}, "countTrailingZeros");
|
|
27314
|
-
LongPrototype.ctz = LongPrototype.countTrailingZeros;
|
|
27315
|
-
LongPrototype.and = /* @__PURE__ */ __name(function and(other) {
|
|
27316
|
-
if (!isLong(other)) other = fromValue(other);
|
|
27317
|
-
return fromBits(
|
|
27318
|
-
this.low & other.low,
|
|
27319
|
-
this.high & other.high,
|
|
27320
|
-
this.unsigned
|
|
27321
|
-
);
|
|
27322
|
-
}, "and");
|
|
27323
|
-
LongPrototype.or = /* @__PURE__ */ __name(function or(other) {
|
|
27324
|
-
if (!isLong(other)) other = fromValue(other);
|
|
27325
|
-
return fromBits(
|
|
27326
|
-
this.low | other.low,
|
|
27327
|
-
this.high | other.high,
|
|
27328
|
-
this.unsigned
|
|
27329
|
-
);
|
|
27330
|
-
}, "or");
|
|
27331
|
-
LongPrototype.xor = /* @__PURE__ */ __name(function xor(other) {
|
|
27332
|
-
if (!isLong(other)) other = fromValue(other);
|
|
27333
|
-
return fromBits(
|
|
27334
|
-
this.low ^ other.low,
|
|
27335
|
-
this.high ^ other.high,
|
|
27336
|
-
this.unsigned
|
|
27337
|
-
);
|
|
27338
|
-
}, "xor");
|
|
27339
|
-
LongPrototype.shiftLeft = /* @__PURE__ */ __name(function shiftLeft(numBits) {
|
|
27340
|
-
if (isLong(numBits)) numBits = numBits.toInt();
|
|
27341
|
-
if ((numBits &= 63) === 0) return this;
|
|
27342
|
-
else if (numBits < 32)
|
|
27343
|
-
return fromBits(
|
|
27344
|
-
this.low << numBits,
|
|
27345
|
-
this.high << numBits | this.low >>> 32 - numBits,
|
|
27346
|
-
this.unsigned
|
|
27347
|
-
);
|
|
27348
|
-
else return fromBits(0, this.low << numBits - 32, this.unsigned);
|
|
27349
|
-
}, "shiftLeft");
|
|
27350
|
-
LongPrototype.shl = LongPrototype.shiftLeft;
|
|
27351
|
-
LongPrototype.shiftRight = /* @__PURE__ */ __name(function shiftRight(numBits) {
|
|
27352
|
-
if (isLong(numBits)) numBits = numBits.toInt();
|
|
27353
|
-
if ((numBits &= 63) === 0) return this;
|
|
27354
|
-
else if (numBits < 32)
|
|
27355
|
-
return fromBits(
|
|
27356
|
-
this.low >>> numBits | this.high << 32 - numBits,
|
|
27357
|
-
this.high >> numBits,
|
|
27358
|
-
this.unsigned
|
|
27359
|
-
);
|
|
27360
|
-
else
|
|
27361
|
-
return fromBits(
|
|
27362
|
-
this.high >> numBits - 32,
|
|
27363
|
-
this.high >= 0 ? 0 : -1,
|
|
27364
|
-
this.unsigned
|
|
27365
|
-
);
|
|
27366
|
-
}, "shiftRight");
|
|
27367
|
-
LongPrototype.shr = LongPrototype.shiftRight;
|
|
27368
|
-
LongPrototype.shiftRightUnsigned = /* @__PURE__ */ __name(function shiftRightUnsigned(numBits) {
|
|
27369
|
-
if (isLong(numBits)) numBits = numBits.toInt();
|
|
27370
|
-
if ((numBits &= 63) === 0) return this;
|
|
27371
|
-
if (numBits < 32)
|
|
27372
|
-
return fromBits(
|
|
27373
|
-
this.low >>> numBits | this.high << 32 - numBits,
|
|
27374
|
-
this.high >>> numBits,
|
|
27375
|
-
this.unsigned
|
|
27376
|
-
);
|
|
27377
|
-
if (numBits === 32) return fromBits(this.high, 0, this.unsigned);
|
|
27378
|
-
return fromBits(this.high >>> numBits - 32, 0, this.unsigned);
|
|
27379
|
-
}, "shiftRightUnsigned");
|
|
27380
|
-
LongPrototype.shru = LongPrototype.shiftRightUnsigned;
|
|
27381
|
-
LongPrototype.shr_u = LongPrototype.shiftRightUnsigned;
|
|
27382
|
-
LongPrototype.rotateLeft = /* @__PURE__ */ __name(function rotateLeft(numBits) {
|
|
27383
|
-
var b;
|
|
27384
|
-
if (isLong(numBits)) numBits = numBits.toInt();
|
|
27385
|
-
if ((numBits &= 63) === 0) return this;
|
|
27386
|
-
if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
|
|
27387
|
-
if (numBits < 32) {
|
|
27388
|
-
b = 32 - numBits;
|
|
27389
|
-
return fromBits(
|
|
27390
|
-
this.low << numBits | this.high >>> b,
|
|
27391
|
-
this.high << numBits | this.low >>> b,
|
|
27392
|
-
this.unsigned
|
|
27393
|
-
);
|
|
27394
|
-
}
|
|
27395
|
-
numBits -= 32;
|
|
27396
|
-
b = 32 - numBits;
|
|
27397
|
-
return fromBits(
|
|
27398
|
-
this.high << numBits | this.low >>> b,
|
|
27399
|
-
this.low << numBits | this.high >>> b,
|
|
27400
|
-
this.unsigned
|
|
27401
|
-
);
|
|
27402
|
-
}, "rotateLeft");
|
|
27403
|
-
LongPrototype.rotl = LongPrototype.rotateLeft;
|
|
27404
|
-
LongPrototype.rotateRight = /* @__PURE__ */ __name(function rotateRight(numBits) {
|
|
27405
|
-
var b;
|
|
27406
|
-
if (isLong(numBits)) numBits = numBits.toInt();
|
|
27407
|
-
if ((numBits &= 63) === 0) return this;
|
|
27408
|
-
if (numBits === 32) return fromBits(this.high, this.low, this.unsigned);
|
|
27409
|
-
if (numBits < 32) {
|
|
27410
|
-
b = 32 - numBits;
|
|
27411
|
-
return fromBits(
|
|
27412
|
-
this.high << b | this.low >>> numBits,
|
|
27413
|
-
this.low << b | this.high >>> numBits,
|
|
27414
|
-
this.unsigned
|
|
27415
|
-
);
|
|
27416
|
-
}
|
|
27417
|
-
numBits -= 32;
|
|
27418
|
-
b = 32 - numBits;
|
|
27419
|
-
return fromBits(
|
|
27420
|
-
this.low << b | this.high >>> numBits,
|
|
27421
|
-
this.high << b | this.low >>> numBits,
|
|
27422
|
-
this.unsigned
|
|
27423
|
-
);
|
|
27424
|
-
}, "rotateRight");
|
|
27425
|
-
LongPrototype.rotr = LongPrototype.rotateRight;
|
|
27426
|
-
LongPrototype.toSigned = /* @__PURE__ */ __name(function toSigned() {
|
|
27427
|
-
if (!this.unsigned) return this;
|
|
27428
|
-
return fromBits(this.low, this.high, false);
|
|
27429
|
-
}, "toSigned");
|
|
27430
|
-
LongPrototype.toUnsigned = /* @__PURE__ */ __name(function toUnsigned() {
|
|
27431
|
-
if (this.unsigned) return this;
|
|
27432
|
-
return fromBits(this.low, this.high, true);
|
|
27433
|
-
}, "toUnsigned");
|
|
27434
|
-
LongPrototype.toBytes = /* @__PURE__ */ __name(function toBytes(le) {
|
|
27435
|
-
return le ? this.toBytesLE() : this.toBytesBE();
|
|
27436
|
-
}, "toBytes");
|
|
27437
|
-
LongPrototype.toBytesLE = /* @__PURE__ */ __name(function toBytesLE() {
|
|
27438
|
-
var hi = this.high, lo = this.low;
|
|
27439
|
-
return [
|
|
27440
|
-
lo & 255,
|
|
27441
|
-
lo >>> 8 & 255,
|
|
27442
|
-
lo >>> 16 & 255,
|
|
27443
|
-
lo >>> 24,
|
|
27444
|
-
hi & 255,
|
|
27445
|
-
hi >>> 8 & 255,
|
|
27446
|
-
hi >>> 16 & 255,
|
|
27447
|
-
hi >>> 24
|
|
27448
|
-
];
|
|
27449
|
-
}, "toBytesLE");
|
|
27450
|
-
LongPrototype.toBytesBE = /* @__PURE__ */ __name(function toBytesBE() {
|
|
27451
|
-
var hi = this.high, lo = this.low;
|
|
27452
|
-
return [
|
|
27453
|
-
hi >>> 24,
|
|
27454
|
-
hi >>> 16 & 255,
|
|
27455
|
-
hi >>> 8 & 255,
|
|
27456
|
-
hi & 255,
|
|
27457
|
-
lo >>> 24,
|
|
27458
|
-
lo >>> 16 & 255,
|
|
27459
|
-
lo >>> 8 & 255,
|
|
27460
|
-
lo & 255
|
|
27461
|
-
];
|
|
27462
|
-
}, "toBytesBE");
|
|
27463
|
-
Long.fromBytes = /* @__PURE__ */ __name(function fromBytes(bytes, unsigned, le) {
|
|
27464
|
-
return le ? Long.fromBytesLE(bytes, unsigned) : Long.fromBytesBE(bytes, unsigned);
|
|
27465
|
-
}, "fromBytes");
|
|
27466
|
-
Long.fromBytesLE = /* @__PURE__ */ __name(function fromBytesLE(bytes, unsigned) {
|
|
27467
|
-
return new Long(
|
|
27468
|
-
bytes[0] | bytes[1] << 8 | bytes[2] << 16 | bytes[3] << 24,
|
|
27469
|
-
bytes[4] | bytes[5] << 8 | bytes[6] << 16 | bytes[7] << 24,
|
|
27470
|
-
unsigned
|
|
27471
|
-
);
|
|
27472
|
-
}, "fromBytesLE");
|
|
27473
|
-
Long.fromBytesBE = /* @__PURE__ */ __name(function fromBytesBE(bytes, unsigned) {
|
|
27474
|
-
return new Long(
|
|
27475
|
-
bytes[4] << 24 | bytes[5] << 16 | bytes[6] << 8 | bytes[7],
|
|
27476
|
-
bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3],
|
|
27477
|
-
unsigned
|
|
27478
|
-
);
|
|
27479
|
-
}, "fromBytesBE");
|
|
27480
|
-
if (typeof BigInt === "function") {
|
|
27481
|
-
Long.fromBigInt = /* @__PURE__ */ __name(function fromBigInt(value, unsigned) {
|
|
27482
|
-
var lowBits = Number(BigInt.asIntN(32, value));
|
|
27483
|
-
var highBits = Number(BigInt.asIntN(32, value >> BigInt(32)));
|
|
27484
|
-
return fromBits(lowBits, highBits, unsigned);
|
|
27485
|
-
}, "fromBigInt");
|
|
27486
|
-
Long.fromValue = /* @__PURE__ */ __name(function fromValueWithBigInt(value, unsigned) {
|
|
27487
|
-
if (typeof value === "bigint") return Long.fromBigInt(value, unsigned);
|
|
27488
|
-
return fromValue(value, unsigned);
|
|
27489
|
-
}, "fromValueWithBigInt");
|
|
27490
|
-
LongPrototype.toBigInt = /* @__PURE__ */ __name(function toBigInt() {
|
|
27491
|
-
var lowBigInt = BigInt(this.low >>> 0);
|
|
27492
|
-
var highBigInt = BigInt(this.unsigned ? this.high >>> 0 : this.high);
|
|
27493
|
-
return highBigInt << BigInt(32) | lowBigInt;
|
|
27494
|
-
}, "toBigInt");
|
|
27495
|
-
}
|
|
27496
|
-
var _default = _exports.default = Long;
|
|
27497
|
-
}
|
|
27498
|
-
);
|
|
27499
|
-
}
|
|
27500
|
-
});
|
|
27501
|
-
|
|
27502
26676
|
// node_modules/@grpc/proto-loader/build/src/index.js
|
|
27503
26677
|
var require_src5 = __commonJS({
|
|
27504
26678
|
"node_modules/@grpc/proto-loader/build/src/index.js"(exports) {
|
|
@@ -66971,11 +66145,18 @@ function mapGeminiFinishReasonToOpenAI(geminiReason) {
|
|
|
66971
66145
|
case FinishReason.MAX_TOKENS:
|
|
66972
66146
|
return "length";
|
|
66973
66147
|
case FinishReason.SAFETY:
|
|
66148
|
+
case FinishReason.RECITATION:
|
|
66149
|
+
case FinishReason.BLOCKLIST:
|
|
66150
|
+
case FinishReason.PROHIBITED_CONTENT:
|
|
66151
|
+
case FinishReason.SPII:
|
|
66152
|
+
case FinishReason.IMAGE_SAFETY:
|
|
66153
|
+
case FinishReason.IMAGE_RECITATION:
|
|
66154
|
+
case FinishReason.IMAGE_PROHIBITED_CONTENT:
|
|
66155
|
+
case FinishReason.IMAGE_OTHER:
|
|
66974
66156
|
return "content_filter";
|
|
66157
|
+
case FinishReason.NO_IMAGE:
|
|
66158
|
+
return "stop";
|
|
66975
66159
|
default:
|
|
66976
|
-
if (geminiReason === "RECITATION") {
|
|
66977
|
-
return "content_filter";
|
|
66978
|
-
}
|
|
66979
66160
|
return "stop";
|
|
66980
66161
|
}
|
|
66981
66162
|
}
|
|
@@ -68013,6 +67194,10 @@ ${content}`,
|
|
|
68013
67194
|
});
|
|
68014
67195
|
}
|
|
68015
67196
|
__name(addToolResultAttributes, "addToolResultAttributes");
|
|
67197
|
+
function clearDetailedSpanState() {
|
|
67198
|
+
seenHashes.clear();
|
|
67199
|
+
}
|
|
67200
|
+
__name(clearDetailedSpanState, "clearDetailedSpanState");
|
|
68016
67201
|
|
|
68017
67202
|
// packages/core/src/telemetry/session-tracing.ts
|
|
68018
67203
|
var debugLogger8 = createDebugLogger("SESSION_TRACING");
|
|
@@ -68529,6 +67714,12 @@ function endHookSpan(span, metadata) {
|
|
|
68529
67714
|
endAttributes["block_type"] = metadata.blockType;
|
|
68530
67715
|
if (metadata.hasAdditionalContext !== void 0)
|
|
68531
67716
|
endAttributes["has_additional_context"] = metadata.hasAdditionalContext;
|
|
67717
|
+
if (metadata.postBatchStop !== void 0)
|
|
67718
|
+
endAttributes["post_batch_stop"] = metadata.postBatchStop;
|
|
67719
|
+
if (metadata.postBatchStopReason !== void 0)
|
|
67720
|
+
endAttributes["post_batch_stop_reason"] = truncateSpanError(
|
|
67721
|
+
metadata.postBatchStopReason
|
|
67722
|
+
);
|
|
68532
67723
|
if (metadata.error !== void 0)
|
|
68533
67724
|
endAttributes["error"] = truncateSpanError(metadata.error);
|
|
68534
67725
|
}
|
|
@@ -71495,11 +70686,11 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
|
|
|
71495
70686
|
}
|
|
71496
70687
|
let baseGenerator;
|
|
71497
70688
|
if (authType === "openai" /* USE_OPENAI */) {
|
|
71498
|
-
const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-
|
|
70689
|
+
const { createOpenAIContentGenerator } = await import("./openaiContentGenerator-N3O3MYIT.js");
|
|
71499
70690
|
baseGenerator = createOpenAIContentGenerator(generatorConfig, config);
|
|
71500
70691
|
} else if (authType === "qwen-oauth" /* QWEN_OAUTH */) {
|
|
71501
70692
|
const { getQwenOAuthClient: getQwenOauthClient } = await import("./qwenOAuth2-LKXG7XVO.js");
|
|
71502
|
-
const { QwenContentGenerator } = await import("./qwenContentGenerator-
|
|
70693
|
+
const { QwenContentGenerator } = await import("./qwenContentGenerator-DEOIWKVH.js");
|
|
71503
70694
|
try {
|
|
71504
70695
|
const qwenClient = await getQwenOauthClient(
|
|
71505
70696
|
config,
|
|
@@ -71516,10 +70707,10 @@ async function createContentGenerator(generatorConfig, config, isInitialAuth) {
|
|
|
71516
70707
|
);
|
|
71517
70708
|
}
|
|
71518
70709
|
} else if (authType === "anthropic" /* USE_ANTHROPIC */) {
|
|
71519
|
-
const { createAnthropicContentGenerator } = await import("./anthropicContentGenerator-
|
|
70710
|
+
const { createAnthropicContentGenerator } = await import("./anthropicContentGenerator-M45RXZVS.js");
|
|
71520
70711
|
baseGenerator = createAnthropicContentGenerator(generatorConfig, config);
|
|
71521
70712
|
} else if (authType === "gemini" /* USE_GEMINI */ || authType === "vertex-ai" /* USE_VERTEX_AI */) {
|
|
71522
|
-
const { createGeminiContentGenerator } = await import("./geminiContentGenerator-
|
|
70713
|
+
const { createGeminiContentGenerator } = await import("./geminiContentGenerator-3LR7MKCQ.js");
|
|
71523
70714
|
baseGenerator = createGeminiContentGenerator(generatorConfig, config);
|
|
71524
70715
|
} else {
|
|
71525
70716
|
throw new Error(
|
|
@@ -73456,7 +72647,7 @@ var ReadFileTool = class _ReadFileTool extends BaseDeclarativeTool {
|
|
|
73456
72647
|
super(
|
|
73457
72648
|
_ReadFileTool.Name,
|
|
73458
72649
|
ToolDisplayNames.READ_FILE,
|
|
73459
|
-
`Reads and returns the content of a specified file. If the file is large, the content will be truncated. The tool's response will clearly indicate if truncation has occurred and will provide details on how to read more of the file using the 'offset' and 'limit' parameters. Handles text, images (PNG, JPG, GIF, WEBP, SVG, BMP), PDF files, and Jupyter notebooks (.ipynb). For text files, it can read specific line ranges. For PDF files, use the 'pages' parameter to extract specific page ranges as text (e.g. '1-5'). Max 20 pages per request. This tool can read Jupyter notebooks (.ipynb) and returns structured cell content with outputs.`,
|
|
72650
|
+
`Reads and returns the content of a specified file. The file_path argument MUST be an absolute path. Always construct it by combining the project root with the file's relative path (e.g. project root '/path/to/project/' + relative 'foo/bar.txt' = '/path/to/project/foo/bar.txt'). If the user provides a relative path, resolve it against the project root first. If the file is large, the content will be truncated. The tool's response will clearly indicate if truncation has occurred and will provide details on how to read more of the file using the 'offset' and 'limit' parameters. Handles text, images (PNG, JPG, GIF, WEBP, SVG, BMP), PDF files, and Jupyter notebooks (.ipynb). For text files, it can read specific line ranges. For PDF files, use the 'pages' parameter to extract specific page ranges as text (e.g. '1-5'). Max 20 pages per request. This tool can read Jupyter notebooks (.ipynb) and returns structured cell content with outputs.`,
|
|
73460
72651
|
"read" /* Read */,
|
|
73461
72652
|
{
|
|
73462
72653
|
properties: {
|
|
@@ -73640,6 +72831,7 @@ export {
|
|
|
73640
72831
|
addModelOutputAttributes,
|
|
73641
72832
|
addToolInputAttributes,
|
|
73642
72833
|
addToolResultAttributes,
|
|
72834
|
+
clearDetailedSpanState,
|
|
73643
72835
|
truncateSpanError,
|
|
73644
72836
|
startInteractionSpan,
|
|
73645
72837
|
endInteractionSpan,
|
|
@@ -73831,25 +73023,4 @@ export {
|
|
|
73831
73023
|
* limitations under the License.
|
|
73832
73024
|
*
|
|
73833
73025
|
*)
|
|
73834
|
-
|
|
73835
|
-
long/umd/index.js:
|
|
73836
|
-
(**
|
|
73837
|
-
* @license
|
|
73838
|
-
* Copyright 2009 The Closure Library Authors
|
|
73839
|
-
* Copyright 2020 Daniel Wirtz / The long.js Authors.
|
|
73840
|
-
*
|
|
73841
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
73842
|
-
* you may not use this file except in compliance with the License.
|
|
73843
|
-
* You may obtain a copy of the License at
|
|
73844
|
-
*
|
|
73845
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
73846
|
-
*
|
|
73847
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
73848
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
73849
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
73850
|
-
* See the License for the specific language governing permissions and
|
|
73851
|
-
* limitations under the License.
|
|
73852
|
-
*
|
|
73853
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
73854
|
-
*)
|
|
73855
73026
|
*/
|