@dxos/codec-protobuf 2.33.9-dev.e605934d → 2.33.9-dev.eb69ac10

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.
Files changed (57) hide show
  1. package/README.md +39 -0
  2. package/dist/{index.js → browser.js} +3983 -197
  3. package/dist/src/buffer-patch.d.ts +1 -0
  4. package/dist/src/buffer-patch.d.ts.map +1 -1
  5. package/dist/src/buffer-patch.js +15 -0
  6. package/dist/src/buffer-patch.js.map +1 -0
  7. package/dist/src/codec.js +53 -0
  8. package/dist/src/codec.js.map +1 -0
  9. package/dist/src/common.js +6 -0
  10. package/dist/src/common.js.map +1 -0
  11. package/dist/src/encoding.js +35 -0
  12. package/dist/src/encoding.js.map +1 -0
  13. package/dist/src/index.d.ts +2 -0
  14. package/dist/src/index.d.ts.map +1 -1
  15. package/dist/src/index.js +31 -0
  16. package/dist/src/index.js.map +1 -0
  17. package/dist/src/interface.js +14 -0
  18. package/dist/src/interface.js.map +1 -0
  19. package/dist/src/mapping.d.ts +3 -0
  20. package/dist/src/mapping.d.ts.map +1 -1
  21. package/dist/src/mapping.js +72 -0
  22. package/dist/src/mapping.js.map +1 -0
  23. package/dist/src/precompiled-mapping/codegen.js +86 -0
  24. package/dist/src/precompiled-mapping/codegen.js.map +1 -0
  25. package/dist/src/precompiled-mapping/create-message-mapper.js +132 -0
  26. package/dist/src/precompiled-mapping/create-message-mapper.js.map +1 -0
  27. package/dist/src/sanitizer.js +53 -0
  28. package/dist/src/sanitizer.js.map +1 -0
  29. package/dist/src/schema.js +86 -0
  30. package/dist/src/schema.js.map +1 -0
  31. package/dist/src/service.d.ts +2 -2
  32. package/dist/src/service.d.ts.map +1 -1
  33. package/dist/src/service.js +113 -0
  34. package/dist/src/service.js.map +1 -0
  35. package/dist/src/stream.d.ts +31 -0
  36. package/dist/src/stream.d.ts.map +1 -1
  37. package/dist/src/stream.js +186 -0
  38. package/dist/src/stream.js.map +1 -0
  39. package/dist/src/stream.test.js +66 -0
  40. package/dist/src/stream.test.js.map +1 -0
  41. package/dist/src/substitutions/any.js +30 -0
  42. package/dist/src/substitutions/any.js.map +1 -0
  43. package/dist/src/substitutions/index.js +22 -0
  44. package/dist/src/substitutions/index.js.map +1 -0
  45. package/dist/src/substitutions/timestamp.js +19 -0
  46. package/dist/src/substitutions/timestamp.js.map +1 -0
  47. package/dist/test/codec.test.js +67 -0
  48. package/dist/test/codec.test.js.map +1 -0
  49. package/dist/tsconfig.tsbuildinfo +1 -1
  50. package/package.json +10 -7
  51. package/src/encoding.ts +9 -0
  52. package/src/index.ts +2 -0
  53. package/src/mapping.ts +60 -0
  54. package/src/precompiled-mapping/create-message-mapper.ts +41 -3
  55. package/src/service.ts +11 -18
  56. package/src/stream.test.ts +3 -1
  57. package/src/stream.ts +72 -1
@@ -23,6 +23,3662 @@ var __copyProps = (to, from, except, desc) => {
23
23
  var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target, mod2));
24
24
  var __toCommonJS = (mod2) => __copyProps(__defProp({}, "__esModule", { value: true }), mod2);
25
25
 
26
+ // ../../../common/temp/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js
27
+ var require_shams = __commonJS({
28
+ "../../../common/temp/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(exports2, module2) {
29
+ "use strict";
30
+ module2.exports = function hasSymbols() {
31
+ if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
32
+ return false;
33
+ }
34
+ if (typeof Symbol.iterator === "symbol") {
35
+ return true;
36
+ }
37
+ var obj = {};
38
+ var sym = Symbol("test");
39
+ var symObj = Object(sym);
40
+ if (typeof sym === "string") {
41
+ return false;
42
+ }
43
+ if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
44
+ return false;
45
+ }
46
+ if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
47
+ return false;
48
+ }
49
+ var symVal = 42;
50
+ obj[sym] = symVal;
51
+ for (sym in obj) {
52
+ return false;
53
+ }
54
+ if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
55
+ return false;
56
+ }
57
+ if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
58
+ return false;
59
+ }
60
+ var syms = Object.getOwnPropertySymbols(obj);
61
+ if (syms.length !== 1 || syms[0] !== sym) {
62
+ return false;
63
+ }
64
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
65
+ return false;
66
+ }
67
+ if (typeof Object.getOwnPropertyDescriptor === "function") {
68
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
69
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) {
70
+ return false;
71
+ }
72
+ }
73
+ return true;
74
+ };
75
+ }
76
+ });
77
+
78
+ // ../../../common/temp/node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js
79
+ var require_shams2 = __commonJS({
80
+ "../../../common/temp/node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js"(exports2, module2) {
81
+ "use strict";
82
+ var hasSymbols = require_shams();
83
+ module2.exports = function hasToStringTagShams() {
84
+ return hasSymbols() && !!Symbol.toStringTag;
85
+ };
86
+ }
87
+ });
88
+
89
+ // ../../../common/temp/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js
90
+ var require_has_symbols = __commonJS({
91
+ "../../../common/temp/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js"(exports2, module2) {
92
+ "use strict";
93
+ var origSymbol = typeof Symbol !== "undefined" && Symbol;
94
+ var hasSymbolSham = require_shams();
95
+ module2.exports = function hasNativeSymbols() {
96
+ if (typeof origSymbol !== "function") {
97
+ return false;
98
+ }
99
+ if (typeof Symbol !== "function") {
100
+ return false;
101
+ }
102
+ if (typeof origSymbol("foo") !== "symbol") {
103
+ return false;
104
+ }
105
+ if (typeof Symbol("bar") !== "symbol") {
106
+ return false;
107
+ }
108
+ return hasSymbolSham();
109
+ };
110
+ }
111
+ });
112
+
113
+ // ../../../common/temp/node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js
114
+ var require_implementation = __commonJS({
115
+ "../../../common/temp/node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js"(exports2, module2) {
116
+ "use strict";
117
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
118
+ var slice = Array.prototype.slice;
119
+ var toStr = Object.prototype.toString;
120
+ var funcType = "[object Function]";
121
+ module2.exports = function bind(that) {
122
+ var target = this;
123
+ if (typeof target !== "function" || toStr.call(target) !== funcType) {
124
+ throw new TypeError(ERROR_MESSAGE + target);
125
+ }
126
+ var args = slice.call(arguments, 1);
127
+ var bound;
128
+ var binder = function() {
129
+ if (this instanceof bound) {
130
+ var result = target.apply(this, args.concat(slice.call(arguments)));
131
+ if (Object(result) === result) {
132
+ return result;
133
+ }
134
+ return this;
135
+ } else {
136
+ return target.apply(that, args.concat(slice.call(arguments)));
137
+ }
138
+ };
139
+ var boundLength = Math.max(0, target.length - args.length);
140
+ var boundArgs = [];
141
+ for (var i = 0; i < boundLength; i++) {
142
+ boundArgs.push("$" + i);
143
+ }
144
+ bound = Function("binder", "return function (" + boundArgs.join(",") + "){ return binder.apply(this,arguments); }")(binder);
145
+ if (target.prototype) {
146
+ var Empty = function Empty2() {
147
+ };
148
+ Empty.prototype = target.prototype;
149
+ bound.prototype = new Empty();
150
+ Empty.prototype = null;
151
+ }
152
+ return bound;
153
+ };
154
+ }
155
+ });
156
+
157
+ // ../../../common/temp/node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js
158
+ var require_function_bind = __commonJS({
159
+ "../../../common/temp/node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js"(exports2, module2) {
160
+ "use strict";
161
+ var implementation = require_implementation();
162
+ module2.exports = Function.prototype.bind || implementation;
163
+ }
164
+ });
165
+
166
+ // ../../../common/temp/node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js
167
+ var require_src = __commonJS({
168
+ "../../../common/temp/node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js"(exports2, module2) {
169
+ "use strict";
170
+ var bind = require_function_bind();
171
+ module2.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
172
+ }
173
+ });
174
+
175
+ // ../../../common/temp/node_modules/.pnpm/get-intrinsic@1.1.1/node_modules/get-intrinsic/index.js
176
+ var require_get_intrinsic = __commonJS({
177
+ "../../../common/temp/node_modules/.pnpm/get-intrinsic@1.1.1/node_modules/get-intrinsic/index.js"(exports2, module2) {
178
+ "use strict";
179
+ var undefined2;
180
+ var $SyntaxError = SyntaxError;
181
+ var $Function = Function;
182
+ var $TypeError = TypeError;
183
+ var getEvalledConstructor = function(expressionSyntax) {
184
+ try {
185
+ return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
186
+ } catch (e) {
187
+ }
188
+ };
189
+ var $gOPD = Object.getOwnPropertyDescriptor;
190
+ if ($gOPD) {
191
+ try {
192
+ $gOPD({}, "");
193
+ } catch (e) {
194
+ $gOPD = null;
195
+ }
196
+ }
197
+ var throwTypeError = function() {
198
+ throw new $TypeError();
199
+ };
200
+ var ThrowTypeError = $gOPD ? function() {
201
+ try {
202
+ arguments.callee;
203
+ return throwTypeError;
204
+ } catch (calleeThrows) {
205
+ try {
206
+ return $gOPD(arguments, "callee").get;
207
+ } catch (gOPDthrows) {
208
+ return throwTypeError;
209
+ }
210
+ }
211
+ }() : throwTypeError;
212
+ var hasSymbols = require_has_symbols()();
213
+ var getProto = Object.getPrototypeOf || function(x) {
214
+ return x.__proto__;
215
+ };
216
+ var needsEval = {};
217
+ var TypedArray = typeof Uint8Array === "undefined" ? undefined2 : getProto(Uint8Array);
218
+ var INTRINSICS = {
219
+ "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
220
+ "%Array%": Array,
221
+ "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
222
+ "%ArrayIteratorPrototype%": hasSymbols ? getProto([][Symbol.iterator]()) : undefined2,
223
+ "%AsyncFromSyncIteratorPrototype%": undefined2,
224
+ "%AsyncFunction%": needsEval,
225
+ "%AsyncGenerator%": needsEval,
226
+ "%AsyncGeneratorFunction%": needsEval,
227
+ "%AsyncIteratorPrototype%": needsEval,
228
+ "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
229
+ "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
230
+ "%Boolean%": Boolean,
231
+ "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
232
+ "%Date%": Date,
233
+ "%decodeURI%": decodeURI,
234
+ "%decodeURIComponent%": decodeURIComponent,
235
+ "%encodeURI%": encodeURI,
236
+ "%encodeURIComponent%": encodeURIComponent,
237
+ "%Error%": Error,
238
+ "%eval%": eval,
239
+ "%EvalError%": EvalError,
240
+ "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
241
+ "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
242
+ "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
243
+ "%Function%": $Function,
244
+ "%GeneratorFunction%": needsEval,
245
+ "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
246
+ "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
247
+ "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
248
+ "%isFinite%": isFinite,
249
+ "%isNaN%": isNaN,
250
+ "%IteratorPrototype%": hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined2,
251
+ "%JSON%": typeof JSON === "object" ? JSON : undefined2,
252
+ "%Map%": typeof Map === "undefined" ? undefined2 : Map,
253
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
254
+ "%Math%": Math,
255
+ "%Number%": Number,
256
+ "%Object%": Object,
257
+ "%parseFloat%": parseFloat,
258
+ "%parseInt%": parseInt,
259
+ "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
260
+ "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
261
+ "%RangeError%": RangeError,
262
+ "%ReferenceError%": ReferenceError,
263
+ "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
264
+ "%RegExp%": RegExp,
265
+ "%Set%": typeof Set === "undefined" ? undefined2 : Set,
266
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
267
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
268
+ "%String%": String,
269
+ "%StringIteratorPrototype%": hasSymbols ? getProto(""[Symbol.iterator]()) : undefined2,
270
+ "%Symbol%": hasSymbols ? Symbol : undefined2,
271
+ "%SyntaxError%": $SyntaxError,
272
+ "%ThrowTypeError%": ThrowTypeError,
273
+ "%TypedArray%": TypedArray,
274
+ "%TypeError%": $TypeError,
275
+ "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
276
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
277
+ "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
278
+ "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
279
+ "%URIError%": URIError,
280
+ "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
281
+ "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
282
+ "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
283
+ };
284
+ var doEval = function doEval2(name) {
285
+ var value;
286
+ if (name === "%AsyncFunction%") {
287
+ value = getEvalledConstructor("async function () {}");
288
+ } else if (name === "%GeneratorFunction%") {
289
+ value = getEvalledConstructor("function* () {}");
290
+ } else if (name === "%AsyncGeneratorFunction%") {
291
+ value = getEvalledConstructor("async function* () {}");
292
+ } else if (name === "%AsyncGenerator%") {
293
+ var fn = doEval2("%AsyncGeneratorFunction%");
294
+ if (fn) {
295
+ value = fn.prototype;
296
+ }
297
+ } else if (name === "%AsyncIteratorPrototype%") {
298
+ var gen = doEval2("%AsyncGenerator%");
299
+ if (gen) {
300
+ value = getProto(gen.prototype);
301
+ }
302
+ }
303
+ INTRINSICS[name] = value;
304
+ return value;
305
+ };
306
+ var LEGACY_ALIASES = {
307
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
308
+ "%ArrayPrototype%": ["Array", "prototype"],
309
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
310
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
311
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
312
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
313
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
314
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
315
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
316
+ "%BooleanPrototype%": ["Boolean", "prototype"],
317
+ "%DataViewPrototype%": ["DataView", "prototype"],
318
+ "%DatePrototype%": ["Date", "prototype"],
319
+ "%ErrorPrototype%": ["Error", "prototype"],
320
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
321
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
322
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
323
+ "%FunctionPrototype%": ["Function", "prototype"],
324
+ "%Generator%": ["GeneratorFunction", "prototype"],
325
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
326
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
327
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
328
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
329
+ "%JSONParse%": ["JSON", "parse"],
330
+ "%JSONStringify%": ["JSON", "stringify"],
331
+ "%MapPrototype%": ["Map", "prototype"],
332
+ "%NumberPrototype%": ["Number", "prototype"],
333
+ "%ObjectPrototype%": ["Object", "prototype"],
334
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
335
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
336
+ "%PromisePrototype%": ["Promise", "prototype"],
337
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
338
+ "%Promise_all%": ["Promise", "all"],
339
+ "%Promise_reject%": ["Promise", "reject"],
340
+ "%Promise_resolve%": ["Promise", "resolve"],
341
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
342
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
343
+ "%RegExpPrototype%": ["RegExp", "prototype"],
344
+ "%SetPrototype%": ["Set", "prototype"],
345
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
346
+ "%StringPrototype%": ["String", "prototype"],
347
+ "%SymbolPrototype%": ["Symbol", "prototype"],
348
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
349
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
350
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
351
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
352
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
353
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
354
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
355
+ "%URIErrorPrototype%": ["URIError", "prototype"],
356
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
357
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
358
+ };
359
+ var bind = require_function_bind();
360
+ var hasOwn = require_src();
361
+ var $concat = bind.call(Function.call, Array.prototype.concat);
362
+ var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
363
+ var $replace = bind.call(Function.call, String.prototype.replace);
364
+ var $strSlice = bind.call(Function.call, String.prototype.slice);
365
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
366
+ var reEscapeChar = /\\(\\)?/g;
367
+ var stringToPath = function stringToPath2(string) {
368
+ var first = $strSlice(string, 0, 1);
369
+ var last = $strSlice(string, -1);
370
+ if (first === "%" && last !== "%") {
371
+ throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
372
+ } else if (last === "%" && first !== "%") {
373
+ throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
374
+ }
375
+ var result = [];
376
+ $replace(string, rePropName, function(match, number, quote, subString) {
377
+ result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
378
+ });
379
+ return result;
380
+ };
381
+ var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
382
+ var intrinsicName = name;
383
+ var alias;
384
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
385
+ alias = LEGACY_ALIASES[intrinsicName];
386
+ intrinsicName = "%" + alias[0] + "%";
387
+ }
388
+ if (hasOwn(INTRINSICS, intrinsicName)) {
389
+ var value = INTRINSICS[intrinsicName];
390
+ if (value === needsEval) {
391
+ value = doEval(intrinsicName);
392
+ }
393
+ if (typeof value === "undefined" && !allowMissing) {
394
+ throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
395
+ }
396
+ return {
397
+ alias,
398
+ name: intrinsicName,
399
+ value
400
+ };
401
+ }
402
+ throw new $SyntaxError("intrinsic " + name + " does not exist!");
403
+ };
404
+ module2.exports = function GetIntrinsic(name, allowMissing) {
405
+ if (typeof name !== "string" || name.length === 0) {
406
+ throw new $TypeError("intrinsic name must be a non-empty string");
407
+ }
408
+ if (arguments.length > 1 && typeof allowMissing !== "boolean") {
409
+ throw new $TypeError('"allowMissing" argument must be a boolean');
410
+ }
411
+ var parts = stringToPath(name);
412
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
413
+ var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
414
+ var intrinsicRealName = intrinsic.name;
415
+ var value = intrinsic.value;
416
+ var skipFurtherCaching = false;
417
+ var alias = intrinsic.alias;
418
+ if (alias) {
419
+ intrinsicBaseName = alias[0];
420
+ $spliceApply(parts, $concat([0, 1], alias));
421
+ }
422
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
423
+ var part = parts[i];
424
+ var first = $strSlice(part, 0, 1);
425
+ var last = $strSlice(part, -1);
426
+ if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
427
+ throw new $SyntaxError("property names with quotes must have matching quotes");
428
+ }
429
+ if (part === "constructor" || !isOwn) {
430
+ skipFurtherCaching = true;
431
+ }
432
+ intrinsicBaseName += "." + part;
433
+ intrinsicRealName = "%" + intrinsicBaseName + "%";
434
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
435
+ value = INTRINSICS[intrinsicRealName];
436
+ } else if (value != null) {
437
+ if (!(part in value)) {
438
+ if (!allowMissing) {
439
+ throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
440
+ }
441
+ return void 0;
442
+ }
443
+ if ($gOPD && i + 1 >= parts.length) {
444
+ var desc = $gOPD(value, part);
445
+ isOwn = !!desc;
446
+ if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
447
+ value = desc.get;
448
+ } else {
449
+ value = value[part];
450
+ }
451
+ } else {
452
+ isOwn = hasOwn(value, part);
453
+ value = value[part];
454
+ }
455
+ if (isOwn && !skipFurtherCaching) {
456
+ INTRINSICS[intrinsicRealName] = value;
457
+ }
458
+ }
459
+ }
460
+ return value;
461
+ };
462
+ }
463
+ });
464
+
465
+ // ../../../common/temp/node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js
466
+ var require_call_bind = __commonJS({
467
+ "../../../common/temp/node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js"(exports2, module2) {
468
+ "use strict";
469
+ var bind = require_function_bind();
470
+ var GetIntrinsic = require_get_intrinsic();
471
+ var $apply = GetIntrinsic("%Function.prototype.apply%");
472
+ var $call = GetIntrinsic("%Function.prototype.call%");
473
+ var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
474
+ var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
475
+ var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
476
+ var $max = GetIntrinsic("%Math.max%");
477
+ if ($defineProperty) {
478
+ try {
479
+ $defineProperty({}, "a", { value: 1 });
480
+ } catch (e) {
481
+ $defineProperty = null;
482
+ }
483
+ }
484
+ module2.exports = function callBind(originalFunction) {
485
+ var func = $reflectApply(bind, $call, arguments);
486
+ if ($gOPD && $defineProperty) {
487
+ var desc = $gOPD(func, "length");
488
+ if (desc.configurable) {
489
+ $defineProperty(func, "length", { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) });
490
+ }
491
+ }
492
+ return func;
493
+ };
494
+ var applyBind = function applyBind2() {
495
+ return $reflectApply(bind, $apply, arguments);
496
+ };
497
+ if ($defineProperty) {
498
+ $defineProperty(module2.exports, "apply", { value: applyBind });
499
+ } else {
500
+ module2.exports.apply = applyBind;
501
+ }
502
+ }
503
+ });
504
+
505
+ // ../../../common/temp/node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js
506
+ var require_callBound = __commonJS({
507
+ "../../../common/temp/node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js"(exports2, module2) {
508
+ "use strict";
509
+ var GetIntrinsic = require_get_intrinsic();
510
+ var callBind = require_call_bind();
511
+ var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
512
+ module2.exports = function callBoundIntrinsic(name, allowMissing) {
513
+ var intrinsic = GetIntrinsic(name, !!allowMissing);
514
+ if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
515
+ return callBind(intrinsic);
516
+ }
517
+ return intrinsic;
518
+ };
519
+ }
520
+ });
521
+
522
+ // ../../../common/temp/node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js
523
+ var require_is_arguments = __commonJS({
524
+ "../../../common/temp/node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js"(exports2, module2) {
525
+ "use strict";
526
+ var hasToStringTag = require_shams2()();
527
+ var callBound = require_callBound();
528
+ var $toString = callBound("Object.prototype.toString");
529
+ var isStandardArguments = function isArguments(value) {
530
+ if (hasToStringTag && value && typeof value === "object" && Symbol.toStringTag in value) {
531
+ return false;
532
+ }
533
+ return $toString(value) === "[object Arguments]";
534
+ };
535
+ var isLegacyArguments = function isArguments(value) {
536
+ if (isStandardArguments(value)) {
537
+ return true;
538
+ }
539
+ return value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && $toString(value) !== "[object Array]" && $toString(value.callee) === "[object Function]";
540
+ };
541
+ var supportsStandardArguments = function() {
542
+ return isStandardArguments(arguments);
543
+ }();
544
+ isStandardArguments.isLegacyArguments = isLegacyArguments;
545
+ module2.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
546
+ }
547
+ });
548
+
549
+ // ../../../common/temp/node_modules/.pnpm/is-generator-function@1.0.10/node_modules/is-generator-function/index.js
550
+ var require_is_generator_function = __commonJS({
551
+ "../../../common/temp/node_modules/.pnpm/is-generator-function@1.0.10/node_modules/is-generator-function/index.js"(exports2, module2) {
552
+ "use strict";
553
+ var toStr = Object.prototype.toString;
554
+ var fnToStr = Function.prototype.toString;
555
+ var isFnRegex = /^\s*(?:function)?\*/;
556
+ var hasToStringTag = require_shams2()();
557
+ var getProto = Object.getPrototypeOf;
558
+ var getGeneratorFunc = function() {
559
+ if (!hasToStringTag) {
560
+ return false;
561
+ }
562
+ try {
563
+ return Function("return function*() {}")();
564
+ } catch (e) {
565
+ }
566
+ };
567
+ var GeneratorFunction;
568
+ module2.exports = function isGeneratorFunction(fn) {
569
+ if (typeof fn !== "function") {
570
+ return false;
571
+ }
572
+ if (isFnRegex.test(fnToStr.call(fn))) {
573
+ return true;
574
+ }
575
+ if (!hasToStringTag) {
576
+ var str = toStr.call(fn);
577
+ return str === "[object GeneratorFunction]";
578
+ }
579
+ if (!getProto) {
580
+ return false;
581
+ }
582
+ if (typeof GeneratorFunction === "undefined") {
583
+ var generatorFunc = getGeneratorFunc();
584
+ GeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;
585
+ }
586
+ return getProto(fn) === GeneratorFunction;
587
+ };
588
+ }
589
+ });
590
+
591
+ // ../../../common/temp/node_modules/.pnpm/foreach@2.0.5/node_modules/foreach/index.js
592
+ var require_foreach = __commonJS({
593
+ "../../../common/temp/node_modules/.pnpm/foreach@2.0.5/node_modules/foreach/index.js"(exports2, module2) {
594
+ var hasOwn = Object.prototype.hasOwnProperty;
595
+ var toString = Object.prototype.toString;
596
+ module2.exports = function forEach(obj, fn, ctx) {
597
+ if (toString.call(fn) !== "[object Function]") {
598
+ throw new TypeError("iterator must be a function");
599
+ }
600
+ var l = obj.length;
601
+ if (l === +l) {
602
+ for (var i = 0; i < l; i++) {
603
+ fn.call(ctx, obj[i], i, obj);
604
+ }
605
+ } else {
606
+ for (var k in obj) {
607
+ if (hasOwn.call(obj, k)) {
608
+ fn.call(ctx, obj[k], k, obj);
609
+ }
610
+ }
611
+ }
612
+ };
613
+ }
614
+ });
615
+
616
+ // ../../../common/temp/node_modules/.pnpm/available-typed-arrays@1.0.5/node_modules/available-typed-arrays/index.js
617
+ var require_available_typed_arrays = __commonJS({
618
+ "../../../common/temp/node_modules/.pnpm/available-typed-arrays@1.0.5/node_modules/available-typed-arrays/index.js"(exports2, module2) {
619
+ "use strict";
620
+ var possibleNames = [
621
+ "BigInt64Array",
622
+ "BigUint64Array",
623
+ "Float32Array",
624
+ "Float64Array",
625
+ "Int16Array",
626
+ "Int32Array",
627
+ "Int8Array",
628
+ "Uint16Array",
629
+ "Uint32Array",
630
+ "Uint8Array",
631
+ "Uint8ClampedArray"
632
+ ];
633
+ var g = typeof globalThis === "undefined" ? global : globalThis;
634
+ module2.exports = function availableTypedArrays() {
635
+ var out = [];
636
+ for (var i = 0; i < possibleNames.length; i++) {
637
+ if (typeof g[possibleNames[i]] === "function") {
638
+ out[out.length] = possibleNames[i];
639
+ }
640
+ }
641
+ return out;
642
+ };
643
+ }
644
+ });
645
+
646
+ // ../../../common/temp/node_modules/.pnpm/es-abstract@1.20.1/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js
647
+ var require_getOwnPropertyDescriptor = __commonJS({
648
+ "../../../common/temp/node_modules/.pnpm/es-abstract@1.20.1/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js"(exports2, module2) {
649
+ "use strict";
650
+ var GetIntrinsic = require_get_intrinsic();
651
+ var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
652
+ if ($gOPD) {
653
+ try {
654
+ $gOPD([], "length");
655
+ } catch (e) {
656
+ $gOPD = null;
657
+ }
658
+ }
659
+ module2.exports = $gOPD;
660
+ }
661
+ });
662
+
663
+ // ../../../common/temp/node_modules/.pnpm/is-typed-array@1.1.8/node_modules/is-typed-array/index.js
664
+ var require_is_typed_array = __commonJS({
665
+ "../../../common/temp/node_modules/.pnpm/is-typed-array@1.1.8/node_modules/is-typed-array/index.js"(exports2, module2) {
666
+ "use strict";
667
+ var forEach = require_foreach();
668
+ var availableTypedArrays = require_available_typed_arrays();
669
+ var callBound = require_callBound();
670
+ var $toString = callBound("Object.prototype.toString");
671
+ var hasToStringTag = require_shams2()();
672
+ var g = typeof globalThis === "undefined" ? global : globalThis;
673
+ var typedArrays = availableTypedArrays();
674
+ var $indexOf = callBound("Array.prototype.indexOf", true) || function indexOf(array, value) {
675
+ for (var i = 0; i < array.length; i += 1) {
676
+ if (array[i] === value) {
677
+ return i;
678
+ }
679
+ }
680
+ return -1;
681
+ };
682
+ var $slice = callBound("String.prototype.slice");
683
+ var toStrTags = {};
684
+ var gOPD = require_getOwnPropertyDescriptor();
685
+ var getPrototypeOf = Object.getPrototypeOf;
686
+ if (hasToStringTag && gOPD && getPrototypeOf) {
687
+ forEach(typedArrays, function(typedArray) {
688
+ var arr = new g[typedArray]();
689
+ if (Symbol.toStringTag in arr) {
690
+ var proto = getPrototypeOf(arr);
691
+ var descriptor = gOPD(proto, Symbol.toStringTag);
692
+ if (!descriptor) {
693
+ var superProto = getPrototypeOf(proto);
694
+ descriptor = gOPD(superProto, Symbol.toStringTag);
695
+ }
696
+ toStrTags[typedArray] = descriptor.get;
697
+ }
698
+ });
699
+ }
700
+ var tryTypedArrays = function tryAllTypedArrays(value) {
701
+ var anyTrue = false;
702
+ forEach(toStrTags, function(getter, typedArray) {
703
+ if (!anyTrue) {
704
+ try {
705
+ anyTrue = getter.call(value) === typedArray;
706
+ } catch (e) {
707
+ }
708
+ }
709
+ });
710
+ return anyTrue;
711
+ };
712
+ module2.exports = function isTypedArray(value) {
713
+ if (!value || typeof value !== "object") {
714
+ return false;
715
+ }
716
+ if (!hasToStringTag || !(Symbol.toStringTag in value)) {
717
+ var tag = $slice($toString(value), 8, -1);
718
+ return $indexOf(typedArrays, tag) > -1;
719
+ }
720
+ if (!gOPD) {
721
+ return false;
722
+ }
723
+ return tryTypedArrays(value);
724
+ };
725
+ }
726
+ });
727
+
728
+ // ../../../common/temp/node_modules/.pnpm/which-typed-array@1.1.7/node_modules/which-typed-array/index.js
729
+ var require_which_typed_array = __commonJS({
730
+ "../../../common/temp/node_modules/.pnpm/which-typed-array@1.1.7/node_modules/which-typed-array/index.js"(exports2, module2) {
731
+ "use strict";
732
+ var forEach = require_foreach();
733
+ var availableTypedArrays = require_available_typed_arrays();
734
+ var callBound = require_callBound();
735
+ var $toString = callBound("Object.prototype.toString");
736
+ var hasToStringTag = require_shams2()();
737
+ var g = typeof globalThis === "undefined" ? global : globalThis;
738
+ var typedArrays = availableTypedArrays();
739
+ var $slice = callBound("String.prototype.slice");
740
+ var toStrTags = {};
741
+ var gOPD = require_getOwnPropertyDescriptor();
742
+ var getPrototypeOf = Object.getPrototypeOf;
743
+ if (hasToStringTag && gOPD && getPrototypeOf) {
744
+ forEach(typedArrays, function(typedArray) {
745
+ if (typeof g[typedArray] === "function") {
746
+ var arr = new g[typedArray]();
747
+ if (Symbol.toStringTag in arr) {
748
+ var proto = getPrototypeOf(arr);
749
+ var descriptor = gOPD(proto, Symbol.toStringTag);
750
+ if (!descriptor) {
751
+ var superProto = getPrototypeOf(proto);
752
+ descriptor = gOPD(superProto, Symbol.toStringTag);
753
+ }
754
+ toStrTags[typedArray] = descriptor.get;
755
+ }
756
+ }
757
+ });
758
+ }
759
+ var tryTypedArrays = function tryAllTypedArrays(value) {
760
+ var foundName = false;
761
+ forEach(toStrTags, function(getter, typedArray) {
762
+ if (!foundName) {
763
+ try {
764
+ var name = getter.call(value);
765
+ if (name === typedArray) {
766
+ foundName = name;
767
+ }
768
+ } catch (e) {
769
+ }
770
+ }
771
+ });
772
+ return foundName;
773
+ };
774
+ var isTypedArray = require_is_typed_array();
775
+ module2.exports = function whichTypedArray(value) {
776
+ if (!isTypedArray(value)) {
777
+ return false;
778
+ }
779
+ if (!hasToStringTag || !(Symbol.toStringTag in value)) {
780
+ return $slice($toString(value), 8, -1);
781
+ }
782
+ return tryTypedArrays(value);
783
+ };
784
+ }
785
+ });
786
+
787
+ // ../../../common/temp/node_modules/.pnpm/util@0.12.4/node_modules/util/support/types.js
788
+ var require_types = __commonJS({
789
+ "../../../common/temp/node_modules/.pnpm/util@0.12.4/node_modules/util/support/types.js"(exports2) {
790
+ "use strict";
791
+ var isArgumentsObject = require_is_arguments();
792
+ var isGeneratorFunction = require_is_generator_function();
793
+ var whichTypedArray = require_which_typed_array();
794
+ var isTypedArray = require_is_typed_array();
795
+ function uncurryThis(f) {
796
+ return f.call.bind(f);
797
+ }
798
+ var BigIntSupported = typeof BigInt !== "undefined";
799
+ var SymbolSupported = typeof Symbol !== "undefined";
800
+ var ObjectToString = uncurryThis(Object.prototype.toString);
801
+ var numberValue = uncurryThis(Number.prototype.valueOf);
802
+ var stringValue = uncurryThis(String.prototype.valueOf);
803
+ var booleanValue = uncurryThis(Boolean.prototype.valueOf);
804
+ if (BigIntSupported) {
805
+ bigIntValue = uncurryThis(BigInt.prototype.valueOf);
806
+ }
807
+ var bigIntValue;
808
+ if (SymbolSupported) {
809
+ symbolValue = uncurryThis(Symbol.prototype.valueOf);
810
+ }
811
+ var symbolValue;
812
+ function checkBoxedPrimitive(value, prototypeValueOf) {
813
+ if (typeof value !== "object") {
814
+ return false;
815
+ }
816
+ try {
817
+ prototypeValueOf(value);
818
+ return true;
819
+ } catch (e) {
820
+ return false;
821
+ }
822
+ }
823
+ exports2.isArgumentsObject = isArgumentsObject;
824
+ exports2.isGeneratorFunction = isGeneratorFunction;
825
+ exports2.isTypedArray = isTypedArray;
826
+ function isPromise(input) {
827
+ return typeof Promise !== "undefined" && input instanceof Promise || input !== null && typeof input === "object" && typeof input.then === "function" && typeof input.catch === "function";
828
+ }
829
+ exports2.isPromise = isPromise;
830
+ function isArrayBufferView(value) {
831
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
832
+ return ArrayBuffer.isView(value);
833
+ }
834
+ return isTypedArray(value) || isDataView(value);
835
+ }
836
+ exports2.isArrayBufferView = isArrayBufferView;
837
+ function isUint8Array(value) {
838
+ return whichTypedArray(value) === "Uint8Array";
839
+ }
840
+ exports2.isUint8Array = isUint8Array;
841
+ function isUint8ClampedArray(value) {
842
+ return whichTypedArray(value) === "Uint8ClampedArray";
843
+ }
844
+ exports2.isUint8ClampedArray = isUint8ClampedArray;
845
+ function isUint16Array(value) {
846
+ return whichTypedArray(value) === "Uint16Array";
847
+ }
848
+ exports2.isUint16Array = isUint16Array;
849
+ function isUint32Array(value) {
850
+ return whichTypedArray(value) === "Uint32Array";
851
+ }
852
+ exports2.isUint32Array = isUint32Array;
853
+ function isInt8Array(value) {
854
+ return whichTypedArray(value) === "Int8Array";
855
+ }
856
+ exports2.isInt8Array = isInt8Array;
857
+ function isInt16Array(value) {
858
+ return whichTypedArray(value) === "Int16Array";
859
+ }
860
+ exports2.isInt16Array = isInt16Array;
861
+ function isInt32Array(value) {
862
+ return whichTypedArray(value) === "Int32Array";
863
+ }
864
+ exports2.isInt32Array = isInt32Array;
865
+ function isFloat32Array(value) {
866
+ return whichTypedArray(value) === "Float32Array";
867
+ }
868
+ exports2.isFloat32Array = isFloat32Array;
869
+ function isFloat64Array(value) {
870
+ return whichTypedArray(value) === "Float64Array";
871
+ }
872
+ exports2.isFloat64Array = isFloat64Array;
873
+ function isBigInt64Array(value) {
874
+ return whichTypedArray(value) === "BigInt64Array";
875
+ }
876
+ exports2.isBigInt64Array = isBigInt64Array;
877
+ function isBigUint64Array(value) {
878
+ return whichTypedArray(value) === "BigUint64Array";
879
+ }
880
+ exports2.isBigUint64Array = isBigUint64Array;
881
+ function isMapToString(value) {
882
+ return ObjectToString(value) === "[object Map]";
883
+ }
884
+ isMapToString.working = typeof Map !== "undefined" && isMapToString(/* @__PURE__ */ new Map());
885
+ function isMap(value) {
886
+ if (typeof Map === "undefined") {
887
+ return false;
888
+ }
889
+ return isMapToString.working ? isMapToString(value) : value instanceof Map;
890
+ }
891
+ exports2.isMap = isMap;
892
+ function isSetToString(value) {
893
+ return ObjectToString(value) === "[object Set]";
894
+ }
895
+ isSetToString.working = typeof Set !== "undefined" && isSetToString(/* @__PURE__ */ new Set());
896
+ function isSet(value) {
897
+ if (typeof Set === "undefined") {
898
+ return false;
899
+ }
900
+ return isSetToString.working ? isSetToString(value) : value instanceof Set;
901
+ }
902
+ exports2.isSet = isSet;
903
+ function isWeakMapToString(value) {
904
+ return ObjectToString(value) === "[object WeakMap]";
905
+ }
906
+ isWeakMapToString.working = typeof WeakMap !== "undefined" && isWeakMapToString(/* @__PURE__ */ new WeakMap());
907
+ function isWeakMap(value) {
908
+ if (typeof WeakMap === "undefined") {
909
+ return false;
910
+ }
911
+ return isWeakMapToString.working ? isWeakMapToString(value) : value instanceof WeakMap;
912
+ }
913
+ exports2.isWeakMap = isWeakMap;
914
+ function isWeakSetToString(value) {
915
+ return ObjectToString(value) === "[object WeakSet]";
916
+ }
917
+ isWeakSetToString.working = typeof WeakSet !== "undefined" && isWeakSetToString(/* @__PURE__ */ new WeakSet());
918
+ function isWeakSet(value) {
919
+ return isWeakSetToString(value);
920
+ }
921
+ exports2.isWeakSet = isWeakSet;
922
+ function isArrayBufferToString(value) {
923
+ return ObjectToString(value) === "[object ArrayBuffer]";
924
+ }
925
+ isArrayBufferToString.working = typeof ArrayBuffer !== "undefined" && isArrayBufferToString(new ArrayBuffer());
926
+ function isArrayBuffer(value) {
927
+ if (typeof ArrayBuffer === "undefined") {
928
+ return false;
929
+ }
930
+ return isArrayBufferToString.working ? isArrayBufferToString(value) : value instanceof ArrayBuffer;
931
+ }
932
+ exports2.isArrayBuffer = isArrayBuffer;
933
+ function isDataViewToString(value) {
934
+ return ObjectToString(value) === "[object DataView]";
935
+ }
936
+ isDataViewToString.working = typeof ArrayBuffer !== "undefined" && typeof DataView !== "undefined" && isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1));
937
+ function isDataView(value) {
938
+ if (typeof DataView === "undefined") {
939
+ return false;
940
+ }
941
+ return isDataViewToString.working ? isDataViewToString(value) : value instanceof DataView;
942
+ }
943
+ exports2.isDataView = isDataView;
944
+ var SharedArrayBufferCopy = typeof SharedArrayBuffer !== "undefined" ? SharedArrayBuffer : void 0;
945
+ function isSharedArrayBufferToString(value) {
946
+ return ObjectToString(value) === "[object SharedArrayBuffer]";
947
+ }
948
+ function isSharedArrayBuffer(value) {
949
+ if (typeof SharedArrayBufferCopy === "undefined") {
950
+ return false;
951
+ }
952
+ if (typeof isSharedArrayBufferToString.working === "undefined") {
953
+ isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());
954
+ }
955
+ return isSharedArrayBufferToString.working ? isSharedArrayBufferToString(value) : value instanceof SharedArrayBufferCopy;
956
+ }
957
+ exports2.isSharedArrayBuffer = isSharedArrayBuffer;
958
+ function isAsyncFunction(value) {
959
+ return ObjectToString(value) === "[object AsyncFunction]";
960
+ }
961
+ exports2.isAsyncFunction = isAsyncFunction;
962
+ function isMapIterator(value) {
963
+ return ObjectToString(value) === "[object Map Iterator]";
964
+ }
965
+ exports2.isMapIterator = isMapIterator;
966
+ function isSetIterator(value) {
967
+ return ObjectToString(value) === "[object Set Iterator]";
968
+ }
969
+ exports2.isSetIterator = isSetIterator;
970
+ function isGeneratorObject(value) {
971
+ return ObjectToString(value) === "[object Generator]";
972
+ }
973
+ exports2.isGeneratorObject = isGeneratorObject;
974
+ function isWebAssemblyCompiledModule(value) {
975
+ return ObjectToString(value) === "[object WebAssembly.Module]";
976
+ }
977
+ exports2.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;
978
+ function isNumberObject(value) {
979
+ return checkBoxedPrimitive(value, numberValue);
980
+ }
981
+ exports2.isNumberObject = isNumberObject;
982
+ function isStringObject(value) {
983
+ return checkBoxedPrimitive(value, stringValue);
984
+ }
985
+ exports2.isStringObject = isStringObject;
986
+ function isBooleanObject(value) {
987
+ return checkBoxedPrimitive(value, booleanValue);
988
+ }
989
+ exports2.isBooleanObject = isBooleanObject;
990
+ function isBigIntObject(value) {
991
+ return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);
992
+ }
993
+ exports2.isBigIntObject = isBigIntObject;
994
+ function isSymbolObject(value) {
995
+ return SymbolSupported && checkBoxedPrimitive(value, symbolValue);
996
+ }
997
+ exports2.isSymbolObject = isSymbolObject;
998
+ function isBoxedPrimitive(value) {
999
+ return isNumberObject(value) || isStringObject(value) || isBooleanObject(value) || isBigIntObject(value) || isSymbolObject(value);
1000
+ }
1001
+ exports2.isBoxedPrimitive = isBoxedPrimitive;
1002
+ function isAnyArrayBuffer(value) {
1003
+ return typeof Uint8Array !== "undefined" && (isArrayBuffer(value) || isSharedArrayBuffer(value));
1004
+ }
1005
+ exports2.isAnyArrayBuffer = isAnyArrayBuffer;
1006
+ ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(method) {
1007
+ Object.defineProperty(exports2, method, {
1008
+ enumerable: false,
1009
+ value: function() {
1010
+ throw new Error(method + " is not supported in userland");
1011
+ }
1012
+ });
1013
+ });
1014
+ }
1015
+ });
1016
+
1017
+ // ../../../common/temp/node_modules/.pnpm/util@0.12.4/node_modules/util/support/isBufferBrowser.js
1018
+ var require_isBufferBrowser = __commonJS({
1019
+ "../../../common/temp/node_modules/.pnpm/util@0.12.4/node_modules/util/support/isBufferBrowser.js"(exports2, module2) {
1020
+ module2.exports = function isBuffer(arg) {
1021
+ return arg && typeof arg === "object" && typeof arg.copy === "function" && typeof arg.fill === "function" && typeof arg.readUInt8 === "function";
1022
+ };
1023
+ }
1024
+ });
1025
+
1026
+ // ../../../common/temp/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js
1027
+ var require_inherits_browser = __commonJS({
1028
+ "../../../common/temp/node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports2, module2) {
1029
+ if (typeof Object.create === "function") {
1030
+ module2.exports = function inherits(ctor, superCtor) {
1031
+ if (superCtor) {
1032
+ ctor.super_ = superCtor;
1033
+ ctor.prototype = Object.create(superCtor.prototype, {
1034
+ constructor: {
1035
+ value: ctor,
1036
+ enumerable: false,
1037
+ writable: true,
1038
+ configurable: true
1039
+ }
1040
+ });
1041
+ }
1042
+ };
1043
+ } else {
1044
+ module2.exports = function inherits(ctor, superCtor) {
1045
+ if (superCtor) {
1046
+ ctor.super_ = superCtor;
1047
+ var TempCtor = function() {
1048
+ };
1049
+ TempCtor.prototype = superCtor.prototype;
1050
+ ctor.prototype = new TempCtor();
1051
+ ctor.prototype.constructor = ctor;
1052
+ }
1053
+ };
1054
+ }
1055
+ }
1056
+ });
1057
+
1058
+ // ../../../common/temp/node_modules/.pnpm/util@0.12.4/node_modules/util/util.js
1059
+ var require_util = __commonJS({
1060
+ "../../../common/temp/node_modules/.pnpm/util@0.12.4/node_modules/util/util.js"(exports2) {
1061
+ var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors2(obj) {
1062
+ var keys = Object.keys(obj);
1063
+ var descriptors = {};
1064
+ for (var i = 0; i < keys.length; i++) {
1065
+ descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
1066
+ }
1067
+ return descriptors;
1068
+ };
1069
+ var formatRegExp = /%[sdj%]/g;
1070
+ exports2.format = function(f) {
1071
+ if (!isString(f)) {
1072
+ var objects = [];
1073
+ for (var i = 0; i < arguments.length; i++) {
1074
+ objects.push(inspect(arguments[i]));
1075
+ }
1076
+ return objects.join(" ");
1077
+ }
1078
+ var i = 1;
1079
+ var args = arguments;
1080
+ var len = args.length;
1081
+ var str = String(f).replace(formatRegExp, function(x2) {
1082
+ if (x2 === "%%")
1083
+ return "%";
1084
+ if (i >= len)
1085
+ return x2;
1086
+ switch (x2) {
1087
+ case "%s":
1088
+ return String(args[i++]);
1089
+ case "%d":
1090
+ return Number(args[i++]);
1091
+ case "%j":
1092
+ try {
1093
+ return JSON.stringify(args[i++]);
1094
+ } catch (_) {
1095
+ return "[Circular]";
1096
+ }
1097
+ default:
1098
+ return x2;
1099
+ }
1100
+ });
1101
+ for (var x = args[i]; i < len; x = args[++i]) {
1102
+ if (isNull(x) || !isObject(x)) {
1103
+ str += " " + x;
1104
+ } else {
1105
+ str += " " + inspect(x);
1106
+ }
1107
+ }
1108
+ return str;
1109
+ };
1110
+ exports2.deprecate = function(fn, msg) {
1111
+ if (typeof process !== "undefined" && process.noDeprecation === true) {
1112
+ return fn;
1113
+ }
1114
+ if (typeof process === "undefined") {
1115
+ return function() {
1116
+ return exports2.deprecate(fn, msg).apply(this, arguments);
1117
+ };
1118
+ }
1119
+ var warned = false;
1120
+ function deprecated() {
1121
+ if (!warned) {
1122
+ if (process.throwDeprecation) {
1123
+ throw new Error(msg);
1124
+ } else if (process.traceDeprecation) {
1125
+ console.trace(msg);
1126
+ } else {
1127
+ console.error(msg);
1128
+ }
1129
+ warned = true;
1130
+ }
1131
+ return fn.apply(this, arguments);
1132
+ }
1133
+ return deprecated;
1134
+ };
1135
+ var debugs = {};
1136
+ var debugEnvRegex = /^$/;
1137
+ if (process.env.NODE_DEBUG) {
1138
+ debugEnv = process.env.NODE_DEBUG;
1139
+ debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase();
1140
+ debugEnvRegex = new RegExp("^" + debugEnv + "$", "i");
1141
+ }
1142
+ var debugEnv;
1143
+ exports2.debuglog = function(set) {
1144
+ set = set.toUpperCase();
1145
+ if (!debugs[set]) {
1146
+ if (debugEnvRegex.test(set)) {
1147
+ var pid = process.pid;
1148
+ debugs[set] = function() {
1149
+ var msg = exports2.format.apply(exports2, arguments);
1150
+ console.error("%s %d: %s", set, pid, msg);
1151
+ };
1152
+ } else {
1153
+ debugs[set] = function() {
1154
+ };
1155
+ }
1156
+ }
1157
+ return debugs[set];
1158
+ };
1159
+ function inspect(obj, opts) {
1160
+ var ctx = {
1161
+ seen: [],
1162
+ stylize: stylizeNoColor
1163
+ };
1164
+ if (arguments.length >= 3)
1165
+ ctx.depth = arguments[2];
1166
+ if (arguments.length >= 4)
1167
+ ctx.colors = arguments[3];
1168
+ if (isBoolean(opts)) {
1169
+ ctx.showHidden = opts;
1170
+ } else if (opts) {
1171
+ exports2._extend(ctx, opts);
1172
+ }
1173
+ if (isUndefined(ctx.showHidden))
1174
+ ctx.showHidden = false;
1175
+ if (isUndefined(ctx.depth))
1176
+ ctx.depth = 2;
1177
+ if (isUndefined(ctx.colors))
1178
+ ctx.colors = false;
1179
+ if (isUndefined(ctx.customInspect))
1180
+ ctx.customInspect = true;
1181
+ if (ctx.colors)
1182
+ ctx.stylize = stylizeWithColor;
1183
+ return formatValue(ctx, obj, ctx.depth);
1184
+ }
1185
+ exports2.inspect = inspect;
1186
+ inspect.colors = {
1187
+ "bold": [1, 22],
1188
+ "italic": [3, 23],
1189
+ "underline": [4, 24],
1190
+ "inverse": [7, 27],
1191
+ "white": [37, 39],
1192
+ "grey": [90, 39],
1193
+ "black": [30, 39],
1194
+ "blue": [34, 39],
1195
+ "cyan": [36, 39],
1196
+ "green": [32, 39],
1197
+ "magenta": [35, 39],
1198
+ "red": [31, 39],
1199
+ "yellow": [33, 39]
1200
+ };
1201
+ inspect.styles = {
1202
+ "special": "cyan",
1203
+ "number": "yellow",
1204
+ "boolean": "yellow",
1205
+ "undefined": "grey",
1206
+ "null": "bold",
1207
+ "string": "green",
1208
+ "date": "magenta",
1209
+ "regexp": "red"
1210
+ };
1211
+ function stylizeWithColor(str, styleType) {
1212
+ var style = inspect.styles[styleType];
1213
+ if (style) {
1214
+ return "\x1B[" + inspect.colors[style][0] + "m" + str + "\x1B[" + inspect.colors[style][1] + "m";
1215
+ } else {
1216
+ return str;
1217
+ }
1218
+ }
1219
+ function stylizeNoColor(str, styleType) {
1220
+ return str;
1221
+ }
1222
+ function arrayToHash(array) {
1223
+ var hash = {};
1224
+ array.forEach(function(val, idx) {
1225
+ hash[val] = true;
1226
+ });
1227
+ return hash;
1228
+ }
1229
+ function formatValue(ctx, value, recurseTimes) {
1230
+ if (ctx.customInspect && value && isFunction(value.inspect) && value.inspect !== exports2.inspect && !(value.constructor && value.constructor.prototype === value)) {
1231
+ var ret = value.inspect(recurseTimes, ctx);
1232
+ if (!isString(ret)) {
1233
+ ret = formatValue(ctx, ret, recurseTimes);
1234
+ }
1235
+ return ret;
1236
+ }
1237
+ var primitive = formatPrimitive(ctx, value);
1238
+ if (primitive) {
1239
+ return primitive;
1240
+ }
1241
+ var keys = Object.keys(value);
1242
+ var visibleKeys = arrayToHash(keys);
1243
+ if (ctx.showHidden) {
1244
+ keys = Object.getOwnPropertyNames(value);
1245
+ }
1246
+ if (isError(value) && (keys.indexOf("message") >= 0 || keys.indexOf("description") >= 0)) {
1247
+ return formatError(value);
1248
+ }
1249
+ if (keys.length === 0) {
1250
+ if (isFunction(value)) {
1251
+ var name = value.name ? ": " + value.name : "";
1252
+ return ctx.stylize("[Function" + name + "]", "special");
1253
+ }
1254
+ if (isRegExp(value)) {
1255
+ return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
1256
+ }
1257
+ if (isDate(value)) {
1258
+ return ctx.stylize(Date.prototype.toString.call(value), "date");
1259
+ }
1260
+ if (isError(value)) {
1261
+ return formatError(value);
1262
+ }
1263
+ }
1264
+ var base = "", array = false, braces = ["{", "}"];
1265
+ if (isArray(value)) {
1266
+ array = true;
1267
+ braces = ["[", "]"];
1268
+ }
1269
+ if (isFunction(value)) {
1270
+ var n = value.name ? ": " + value.name : "";
1271
+ base = " [Function" + n + "]";
1272
+ }
1273
+ if (isRegExp(value)) {
1274
+ base = " " + RegExp.prototype.toString.call(value);
1275
+ }
1276
+ if (isDate(value)) {
1277
+ base = " " + Date.prototype.toUTCString.call(value);
1278
+ }
1279
+ if (isError(value)) {
1280
+ base = " " + formatError(value);
1281
+ }
1282
+ if (keys.length === 0 && (!array || value.length == 0)) {
1283
+ return braces[0] + base + braces[1];
1284
+ }
1285
+ if (recurseTimes < 0) {
1286
+ if (isRegExp(value)) {
1287
+ return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
1288
+ } else {
1289
+ return ctx.stylize("[Object]", "special");
1290
+ }
1291
+ }
1292
+ ctx.seen.push(value);
1293
+ var output;
1294
+ if (array) {
1295
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
1296
+ } else {
1297
+ output = keys.map(function(key) {
1298
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
1299
+ });
1300
+ }
1301
+ ctx.seen.pop();
1302
+ return reduceToSingleString(output, base, braces);
1303
+ }
1304
+ function formatPrimitive(ctx, value) {
1305
+ if (isUndefined(value))
1306
+ return ctx.stylize("undefined", "undefined");
1307
+ if (isString(value)) {
1308
+ var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
1309
+ return ctx.stylize(simple, "string");
1310
+ }
1311
+ if (isNumber(value))
1312
+ return ctx.stylize("" + value, "number");
1313
+ if (isBoolean(value))
1314
+ return ctx.stylize("" + value, "boolean");
1315
+ if (isNull(value))
1316
+ return ctx.stylize("null", "null");
1317
+ }
1318
+ function formatError(value) {
1319
+ return "[" + Error.prototype.toString.call(value) + "]";
1320
+ }
1321
+ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
1322
+ var output = [];
1323
+ for (var i = 0, l = value.length; i < l; ++i) {
1324
+ if (hasOwnProperty(value, String(i))) {
1325
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, String(i), true));
1326
+ } else {
1327
+ output.push("");
1328
+ }
1329
+ }
1330
+ keys.forEach(function(key) {
1331
+ if (!key.match(/^\d+$/)) {
1332
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, key, true));
1333
+ }
1334
+ });
1335
+ return output;
1336
+ }
1337
+ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
1338
+ var name, str, desc;
1339
+ desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
1340
+ if (desc.get) {
1341
+ if (desc.set) {
1342
+ str = ctx.stylize("[Getter/Setter]", "special");
1343
+ } else {
1344
+ str = ctx.stylize("[Getter]", "special");
1345
+ }
1346
+ } else {
1347
+ if (desc.set) {
1348
+ str = ctx.stylize("[Setter]", "special");
1349
+ }
1350
+ }
1351
+ if (!hasOwnProperty(visibleKeys, key)) {
1352
+ name = "[" + key + "]";
1353
+ }
1354
+ if (!str) {
1355
+ if (ctx.seen.indexOf(desc.value) < 0) {
1356
+ if (isNull(recurseTimes)) {
1357
+ str = formatValue(ctx, desc.value, null);
1358
+ } else {
1359
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
1360
+ }
1361
+ if (str.indexOf("\n") > -1) {
1362
+ if (array) {
1363
+ str = str.split("\n").map(function(line) {
1364
+ return " " + line;
1365
+ }).join("\n").substr(2);
1366
+ } else {
1367
+ str = "\n" + str.split("\n").map(function(line) {
1368
+ return " " + line;
1369
+ }).join("\n");
1370
+ }
1371
+ }
1372
+ } else {
1373
+ str = ctx.stylize("[Circular]", "special");
1374
+ }
1375
+ }
1376
+ if (isUndefined(name)) {
1377
+ if (array && key.match(/^\d+$/)) {
1378
+ return str;
1379
+ }
1380
+ name = JSON.stringify("" + key);
1381
+ if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
1382
+ name = name.substr(1, name.length - 2);
1383
+ name = ctx.stylize(name, "name");
1384
+ } else {
1385
+ name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
1386
+ name = ctx.stylize(name, "string");
1387
+ }
1388
+ }
1389
+ return name + ": " + str;
1390
+ }
1391
+ function reduceToSingleString(output, base, braces) {
1392
+ var numLinesEst = 0;
1393
+ var length = output.reduce(function(prev, cur) {
1394
+ numLinesEst++;
1395
+ if (cur.indexOf("\n") >= 0)
1396
+ numLinesEst++;
1397
+ return prev + cur.replace(/\u001b\[\d\d?m/g, "").length + 1;
1398
+ }, 0);
1399
+ if (length > 60) {
1400
+ return braces[0] + (base === "" ? "" : base + "\n ") + " " + output.join(",\n ") + " " + braces[1];
1401
+ }
1402
+ return braces[0] + base + " " + output.join(", ") + " " + braces[1];
1403
+ }
1404
+ exports2.types = require_types();
1405
+ function isArray(ar) {
1406
+ return Array.isArray(ar);
1407
+ }
1408
+ exports2.isArray = isArray;
1409
+ function isBoolean(arg) {
1410
+ return typeof arg === "boolean";
1411
+ }
1412
+ exports2.isBoolean = isBoolean;
1413
+ function isNull(arg) {
1414
+ return arg === null;
1415
+ }
1416
+ exports2.isNull = isNull;
1417
+ function isNullOrUndefined(arg) {
1418
+ return arg == null;
1419
+ }
1420
+ exports2.isNullOrUndefined = isNullOrUndefined;
1421
+ function isNumber(arg) {
1422
+ return typeof arg === "number";
1423
+ }
1424
+ exports2.isNumber = isNumber;
1425
+ function isString(arg) {
1426
+ return typeof arg === "string";
1427
+ }
1428
+ exports2.isString = isString;
1429
+ function isSymbol(arg) {
1430
+ return typeof arg === "symbol";
1431
+ }
1432
+ exports2.isSymbol = isSymbol;
1433
+ function isUndefined(arg) {
1434
+ return arg === void 0;
1435
+ }
1436
+ exports2.isUndefined = isUndefined;
1437
+ function isRegExp(re) {
1438
+ return isObject(re) && objectToString(re) === "[object RegExp]";
1439
+ }
1440
+ exports2.isRegExp = isRegExp;
1441
+ exports2.types.isRegExp = isRegExp;
1442
+ function isObject(arg) {
1443
+ return typeof arg === "object" && arg !== null;
1444
+ }
1445
+ exports2.isObject = isObject;
1446
+ function isDate(d) {
1447
+ return isObject(d) && objectToString(d) === "[object Date]";
1448
+ }
1449
+ exports2.isDate = isDate;
1450
+ exports2.types.isDate = isDate;
1451
+ function isError(e) {
1452
+ return isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error);
1453
+ }
1454
+ exports2.isError = isError;
1455
+ exports2.types.isNativeError = isError;
1456
+ function isFunction(arg) {
1457
+ return typeof arg === "function";
1458
+ }
1459
+ exports2.isFunction = isFunction;
1460
+ function isPrimitive(arg) {
1461
+ return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || typeof arg === "undefined";
1462
+ }
1463
+ exports2.isPrimitive = isPrimitive;
1464
+ exports2.isBuffer = require_isBufferBrowser();
1465
+ function objectToString(o) {
1466
+ return Object.prototype.toString.call(o);
1467
+ }
1468
+ function pad(n) {
1469
+ return n < 10 ? "0" + n.toString(10) : n.toString(10);
1470
+ }
1471
+ var months = [
1472
+ "Jan",
1473
+ "Feb",
1474
+ "Mar",
1475
+ "Apr",
1476
+ "May",
1477
+ "Jun",
1478
+ "Jul",
1479
+ "Aug",
1480
+ "Sep",
1481
+ "Oct",
1482
+ "Nov",
1483
+ "Dec"
1484
+ ];
1485
+ function timestamp() {
1486
+ var d = new Date();
1487
+ var time = [
1488
+ pad(d.getHours()),
1489
+ pad(d.getMinutes()),
1490
+ pad(d.getSeconds())
1491
+ ].join(":");
1492
+ return [d.getDate(), months[d.getMonth()], time].join(" ");
1493
+ }
1494
+ exports2.log = function() {
1495
+ console.log("%s - %s", timestamp(), exports2.format.apply(exports2, arguments));
1496
+ };
1497
+ exports2.inherits = require_inherits_browser();
1498
+ exports2._extend = function(origin, add) {
1499
+ if (!add || !isObject(add))
1500
+ return origin;
1501
+ var keys = Object.keys(add);
1502
+ var i = keys.length;
1503
+ while (i--) {
1504
+ origin[keys[i]] = add[keys[i]];
1505
+ }
1506
+ return origin;
1507
+ };
1508
+ function hasOwnProperty(obj, prop) {
1509
+ return Object.prototype.hasOwnProperty.call(obj, prop);
1510
+ }
1511
+ var kCustomPromisifiedSymbol = typeof Symbol !== "undefined" ? Symbol("util.promisify.custom") : void 0;
1512
+ exports2.promisify = function promisify(original) {
1513
+ if (typeof original !== "function")
1514
+ throw new TypeError('The "original" argument must be of type Function');
1515
+ if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
1516
+ var fn = original[kCustomPromisifiedSymbol];
1517
+ if (typeof fn !== "function") {
1518
+ throw new TypeError('The "util.promisify.custom" argument must be of type Function');
1519
+ }
1520
+ Object.defineProperty(fn, kCustomPromisifiedSymbol, {
1521
+ value: fn,
1522
+ enumerable: false,
1523
+ writable: false,
1524
+ configurable: true
1525
+ });
1526
+ return fn;
1527
+ }
1528
+ function fn() {
1529
+ var promiseResolve, promiseReject;
1530
+ var promise = new Promise(function(resolve, reject) {
1531
+ promiseResolve = resolve;
1532
+ promiseReject = reject;
1533
+ });
1534
+ var args = [];
1535
+ for (var i = 0; i < arguments.length; i++) {
1536
+ args.push(arguments[i]);
1537
+ }
1538
+ args.push(function(err, value) {
1539
+ if (err) {
1540
+ promiseReject(err);
1541
+ } else {
1542
+ promiseResolve(value);
1543
+ }
1544
+ });
1545
+ try {
1546
+ original.apply(this, args);
1547
+ } catch (err) {
1548
+ promiseReject(err);
1549
+ }
1550
+ return promise;
1551
+ }
1552
+ Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
1553
+ if (kCustomPromisifiedSymbol)
1554
+ Object.defineProperty(fn, kCustomPromisifiedSymbol, {
1555
+ value: fn,
1556
+ enumerable: false,
1557
+ writable: false,
1558
+ configurable: true
1559
+ });
1560
+ return Object.defineProperties(fn, getOwnPropertyDescriptors(original));
1561
+ };
1562
+ exports2.promisify.custom = kCustomPromisifiedSymbol;
1563
+ function callbackifyOnRejected(reason, cb) {
1564
+ if (!reason) {
1565
+ var newReason = new Error("Promise was rejected with a falsy value");
1566
+ newReason.reason = reason;
1567
+ reason = newReason;
1568
+ }
1569
+ return cb(reason);
1570
+ }
1571
+ function callbackify(original) {
1572
+ if (typeof original !== "function") {
1573
+ throw new TypeError('The "original" argument must be of type Function');
1574
+ }
1575
+ function callbackified() {
1576
+ var args = [];
1577
+ for (var i = 0; i < arguments.length; i++) {
1578
+ args.push(arguments[i]);
1579
+ }
1580
+ var maybeCb = args.pop();
1581
+ if (typeof maybeCb !== "function") {
1582
+ throw new TypeError("The last argument must be of type Function");
1583
+ }
1584
+ var self2 = this;
1585
+ var cb = function() {
1586
+ return maybeCb.apply(self2, arguments);
1587
+ };
1588
+ original.apply(this, args).then(function(ret) {
1589
+ process.nextTick(cb.bind(null, null, ret));
1590
+ }, function(rej) {
1591
+ process.nextTick(callbackifyOnRejected.bind(null, rej, cb));
1592
+ });
1593
+ }
1594
+ Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
1595
+ Object.defineProperties(callbackified, getOwnPropertyDescriptors(original));
1596
+ return callbackified;
1597
+ }
1598
+ exports2.callbackify = callbackify;
1599
+ }
1600
+ });
1601
+
1602
+ // ../../../common/temp/node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/internal/errors.js
1603
+ var require_errors = __commonJS({
1604
+ "../../../common/temp/node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/internal/errors.js"(exports2, module2) {
1605
+ "use strict";
1606
+ function _typeof(obj) {
1607
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
1608
+ _typeof = function _typeof2(obj2) {
1609
+ return typeof obj2;
1610
+ };
1611
+ } else {
1612
+ _typeof = function _typeof2(obj2) {
1613
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
1614
+ };
1615
+ }
1616
+ return _typeof(obj);
1617
+ }
1618
+ function _classCallCheck(instance, Constructor) {
1619
+ if (!(instance instanceof Constructor)) {
1620
+ throw new TypeError("Cannot call a class as a function");
1621
+ }
1622
+ }
1623
+ function _possibleConstructorReturn(self2, call) {
1624
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
1625
+ return call;
1626
+ }
1627
+ return _assertThisInitialized(self2);
1628
+ }
1629
+ function _assertThisInitialized(self2) {
1630
+ if (self2 === void 0) {
1631
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1632
+ }
1633
+ return self2;
1634
+ }
1635
+ function _getPrototypeOf(o) {
1636
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
1637
+ return o2.__proto__ || Object.getPrototypeOf(o2);
1638
+ };
1639
+ return _getPrototypeOf(o);
1640
+ }
1641
+ function _inherits(subClass, superClass) {
1642
+ if (typeof superClass !== "function" && superClass !== null) {
1643
+ throw new TypeError("Super expression must either be null or a function");
1644
+ }
1645
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
1646
+ if (superClass)
1647
+ _setPrototypeOf(subClass, superClass);
1648
+ }
1649
+ function _setPrototypeOf(o, p) {
1650
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
1651
+ o2.__proto__ = p2;
1652
+ return o2;
1653
+ };
1654
+ return _setPrototypeOf(o, p);
1655
+ }
1656
+ var codes = {};
1657
+ var assert5;
1658
+ var util;
1659
+ function createErrorType(code, message, Base) {
1660
+ if (!Base) {
1661
+ Base = Error;
1662
+ }
1663
+ function getMessage(arg1, arg2, arg3) {
1664
+ if (typeof message === "string") {
1665
+ return message;
1666
+ } else {
1667
+ return message(arg1, arg2, arg3);
1668
+ }
1669
+ }
1670
+ var NodeError = /* @__PURE__ */ function(_Base) {
1671
+ _inherits(NodeError2, _Base);
1672
+ function NodeError2(arg1, arg2, arg3) {
1673
+ var _this;
1674
+ _classCallCheck(this, NodeError2);
1675
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(NodeError2).call(this, getMessage(arg1, arg2, arg3)));
1676
+ _this.code = code;
1677
+ return _this;
1678
+ }
1679
+ return NodeError2;
1680
+ }(Base);
1681
+ codes[code] = NodeError;
1682
+ }
1683
+ function oneOf(expected, thing) {
1684
+ if (Array.isArray(expected)) {
1685
+ var len = expected.length;
1686
+ expected = expected.map(function(i) {
1687
+ return String(i);
1688
+ });
1689
+ if (len > 2) {
1690
+ return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(", "), ", or ") + expected[len - 1];
1691
+ } else if (len === 2) {
1692
+ return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
1693
+ } else {
1694
+ return "of ".concat(thing, " ").concat(expected[0]);
1695
+ }
1696
+ } else {
1697
+ return "of ".concat(thing, " ").concat(String(expected));
1698
+ }
1699
+ }
1700
+ function startsWith(str, search, pos) {
1701
+ return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
1702
+ }
1703
+ function endsWith(str, search, this_len) {
1704
+ if (this_len === void 0 || this_len > str.length) {
1705
+ this_len = str.length;
1706
+ }
1707
+ return str.substring(this_len - search.length, this_len) === search;
1708
+ }
1709
+ function includes(str, search, start) {
1710
+ if (typeof start !== "number") {
1711
+ start = 0;
1712
+ }
1713
+ if (start + search.length > str.length) {
1714
+ return false;
1715
+ } else {
1716
+ return str.indexOf(search, start) !== -1;
1717
+ }
1718
+ }
1719
+ createErrorType("ERR_AMBIGUOUS_ARGUMENT", 'The "%s" argument is ambiguous. %s', TypeError);
1720
+ createErrorType("ERR_INVALID_ARG_TYPE", function(name, expected, actual) {
1721
+ if (assert5 === void 0)
1722
+ assert5 = require_assert();
1723
+ assert5(typeof name === "string", "'name' must be a string");
1724
+ var determiner;
1725
+ if (typeof expected === "string" && startsWith(expected, "not ")) {
1726
+ determiner = "must not be";
1727
+ expected = expected.replace(/^not /, "");
1728
+ } else {
1729
+ determiner = "must be";
1730
+ }
1731
+ var msg;
1732
+ if (endsWith(name, " argument")) {
1733
+ msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
1734
+ } else {
1735
+ var type = includes(name, ".") ? "property" : "argument";
1736
+ msg = 'The "'.concat(name, '" ').concat(type, " ").concat(determiner, " ").concat(oneOf(expected, "type"));
1737
+ }
1738
+ msg += ". Received type ".concat(_typeof(actual));
1739
+ return msg;
1740
+ }, TypeError);
1741
+ createErrorType("ERR_INVALID_ARG_VALUE", function(name, value) {
1742
+ var reason = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "is invalid";
1743
+ if (util === void 0)
1744
+ util = require_util();
1745
+ var inspected = util.inspect(value);
1746
+ if (inspected.length > 128) {
1747
+ inspected = "".concat(inspected.slice(0, 128), "...");
1748
+ }
1749
+ return "The argument '".concat(name, "' ").concat(reason, ". Received ").concat(inspected);
1750
+ }, TypeError, RangeError);
1751
+ createErrorType("ERR_INVALID_RETURN_VALUE", function(input, name, value) {
1752
+ var type;
1753
+ if (value && value.constructor && value.constructor.name) {
1754
+ type = "instance of ".concat(value.constructor.name);
1755
+ } else {
1756
+ type = "type ".concat(_typeof(value));
1757
+ }
1758
+ return "Expected ".concat(input, ' to be returned from the "').concat(name, '"') + " function but got ".concat(type, ".");
1759
+ }, TypeError);
1760
+ createErrorType("ERR_MISSING_ARGS", function() {
1761
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1762
+ args[_key] = arguments[_key];
1763
+ }
1764
+ if (assert5 === void 0)
1765
+ assert5 = require_assert();
1766
+ assert5(args.length > 0, "At least one arg needs to be specified");
1767
+ var msg = "The ";
1768
+ var len = args.length;
1769
+ args = args.map(function(a) {
1770
+ return '"'.concat(a, '"');
1771
+ });
1772
+ switch (len) {
1773
+ case 1:
1774
+ msg += "".concat(args[0], " argument");
1775
+ break;
1776
+ case 2:
1777
+ msg += "".concat(args[0], " and ").concat(args[1], " arguments");
1778
+ break;
1779
+ default:
1780
+ msg += args.slice(0, len - 1).join(", ");
1781
+ msg += ", and ".concat(args[len - 1], " arguments");
1782
+ break;
1783
+ }
1784
+ return "".concat(msg, " must be specified");
1785
+ }, TypeError);
1786
+ module2.exports.codes = codes;
1787
+ }
1788
+ });
1789
+
1790
+ // ../../../common/temp/node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/internal/assert/assertion_error.js
1791
+ var require_assertion_error = __commonJS({
1792
+ "../../../common/temp/node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/internal/assert/assertion_error.js"(exports2, module2) {
1793
+ "use strict";
1794
+ function _objectSpread(target) {
1795
+ for (var i = 1; i < arguments.length; i++) {
1796
+ var source = arguments[i] != null ? arguments[i] : {};
1797
+ var ownKeys = Object.keys(source);
1798
+ if (typeof Object.getOwnPropertySymbols === "function") {
1799
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1800
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1801
+ }));
1802
+ }
1803
+ ownKeys.forEach(function(key) {
1804
+ _defineProperty(target, key, source[key]);
1805
+ });
1806
+ }
1807
+ return target;
1808
+ }
1809
+ function _defineProperty(obj, key, value) {
1810
+ if (key in obj) {
1811
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
1812
+ } else {
1813
+ obj[key] = value;
1814
+ }
1815
+ return obj;
1816
+ }
1817
+ function _classCallCheck(instance, Constructor) {
1818
+ if (!(instance instanceof Constructor)) {
1819
+ throw new TypeError("Cannot call a class as a function");
1820
+ }
1821
+ }
1822
+ function _defineProperties(target, props) {
1823
+ for (var i = 0; i < props.length; i++) {
1824
+ var descriptor = props[i];
1825
+ descriptor.enumerable = descriptor.enumerable || false;
1826
+ descriptor.configurable = true;
1827
+ if ("value" in descriptor)
1828
+ descriptor.writable = true;
1829
+ Object.defineProperty(target, descriptor.key, descriptor);
1830
+ }
1831
+ }
1832
+ function _createClass(Constructor, protoProps, staticProps) {
1833
+ if (protoProps)
1834
+ _defineProperties(Constructor.prototype, protoProps);
1835
+ if (staticProps)
1836
+ _defineProperties(Constructor, staticProps);
1837
+ return Constructor;
1838
+ }
1839
+ function _possibleConstructorReturn(self2, call) {
1840
+ if (call && (_typeof(call) === "object" || typeof call === "function")) {
1841
+ return call;
1842
+ }
1843
+ return _assertThisInitialized(self2);
1844
+ }
1845
+ function _assertThisInitialized(self2) {
1846
+ if (self2 === void 0) {
1847
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1848
+ }
1849
+ return self2;
1850
+ }
1851
+ function _inherits(subClass, superClass) {
1852
+ if (typeof superClass !== "function" && superClass !== null) {
1853
+ throw new TypeError("Super expression must either be null or a function");
1854
+ }
1855
+ subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });
1856
+ if (superClass)
1857
+ _setPrototypeOf(subClass, superClass);
1858
+ }
1859
+ function _wrapNativeSuper(Class) {
1860
+ var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
1861
+ _wrapNativeSuper = function _wrapNativeSuper2(Class2) {
1862
+ if (Class2 === null || !_isNativeFunction(Class2))
1863
+ return Class2;
1864
+ if (typeof Class2 !== "function") {
1865
+ throw new TypeError("Super expression must either be null or a function");
1866
+ }
1867
+ if (typeof _cache !== "undefined") {
1868
+ if (_cache.has(Class2))
1869
+ return _cache.get(Class2);
1870
+ _cache.set(Class2, Wrapper);
1871
+ }
1872
+ function Wrapper() {
1873
+ return _construct(Class2, arguments, _getPrototypeOf(this).constructor);
1874
+ }
1875
+ Wrapper.prototype = Object.create(Class2.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } });
1876
+ return _setPrototypeOf(Wrapper, Class2);
1877
+ };
1878
+ return _wrapNativeSuper(Class);
1879
+ }
1880
+ function isNativeReflectConstruct() {
1881
+ if (typeof Reflect === "undefined" || !Reflect.construct)
1882
+ return false;
1883
+ if (Reflect.construct.sham)
1884
+ return false;
1885
+ if (typeof Proxy === "function")
1886
+ return true;
1887
+ try {
1888
+ Date.prototype.toString.call(Reflect.construct(Date, [], function() {
1889
+ }));
1890
+ return true;
1891
+ } catch (e) {
1892
+ return false;
1893
+ }
1894
+ }
1895
+ function _construct(Parent, args, Class) {
1896
+ if (isNativeReflectConstruct()) {
1897
+ _construct = Reflect.construct;
1898
+ } else {
1899
+ _construct = function _construct2(Parent2, args2, Class2) {
1900
+ var a = [null];
1901
+ a.push.apply(a, args2);
1902
+ var Constructor = Function.bind.apply(Parent2, a);
1903
+ var instance = new Constructor();
1904
+ if (Class2)
1905
+ _setPrototypeOf(instance, Class2.prototype);
1906
+ return instance;
1907
+ };
1908
+ }
1909
+ return _construct.apply(null, arguments);
1910
+ }
1911
+ function _isNativeFunction(fn) {
1912
+ return Function.toString.call(fn).indexOf("[native code]") !== -1;
1913
+ }
1914
+ function _setPrototypeOf(o, p) {
1915
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
1916
+ o2.__proto__ = p2;
1917
+ return o2;
1918
+ };
1919
+ return _setPrototypeOf(o, p);
1920
+ }
1921
+ function _getPrototypeOf(o) {
1922
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
1923
+ return o2.__proto__ || Object.getPrototypeOf(o2);
1924
+ };
1925
+ return _getPrototypeOf(o);
1926
+ }
1927
+ function _typeof(obj) {
1928
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
1929
+ _typeof = function _typeof2(obj2) {
1930
+ return typeof obj2;
1931
+ };
1932
+ } else {
1933
+ _typeof = function _typeof2(obj2) {
1934
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
1935
+ };
1936
+ }
1937
+ return _typeof(obj);
1938
+ }
1939
+ var _require = require_util();
1940
+ var inspect = _require.inspect;
1941
+ var _require2 = require_errors();
1942
+ var ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE;
1943
+ function endsWith(str, search, this_len) {
1944
+ if (this_len === void 0 || this_len > str.length) {
1945
+ this_len = str.length;
1946
+ }
1947
+ return str.substring(this_len - search.length, this_len) === search;
1948
+ }
1949
+ function repeat(str, count) {
1950
+ count = Math.floor(count);
1951
+ if (str.length == 0 || count == 0)
1952
+ return "";
1953
+ var maxCount = str.length * count;
1954
+ count = Math.floor(Math.log(count) / Math.log(2));
1955
+ while (count) {
1956
+ str += str;
1957
+ count--;
1958
+ }
1959
+ str += str.substring(0, maxCount - str.length);
1960
+ return str;
1961
+ }
1962
+ var blue = "";
1963
+ var green = "";
1964
+ var red = "";
1965
+ var white = "";
1966
+ var kReadableOperator = {
1967
+ deepStrictEqual: "Expected values to be strictly deep-equal:",
1968
+ strictEqual: "Expected values to be strictly equal:",
1969
+ strictEqualObject: 'Expected "actual" to be reference-equal to "expected":',
1970
+ deepEqual: "Expected values to be loosely deep-equal:",
1971
+ equal: "Expected values to be loosely equal:",
1972
+ notDeepStrictEqual: 'Expected "actual" not to be strictly deep-equal to:',
1973
+ notStrictEqual: 'Expected "actual" to be strictly unequal to:',
1974
+ notStrictEqualObject: 'Expected "actual" not to be reference-equal to "expected":',
1975
+ notDeepEqual: 'Expected "actual" not to be loosely deep-equal to:',
1976
+ notEqual: 'Expected "actual" to be loosely unequal to:',
1977
+ notIdentical: "Values identical but not reference-equal:"
1978
+ };
1979
+ var kMaxShortLength = 10;
1980
+ function copyError(source) {
1981
+ var keys = Object.keys(source);
1982
+ var target = Object.create(Object.getPrototypeOf(source));
1983
+ keys.forEach(function(key) {
1984
+ target[key] = source[key];
1985
+ });
1986
+ Object.defineProperty(target, "message", {
1987
+ value: source.message
1988
+ });
1989
+ return target;
1990
+ }
1991
+ function inspectValue(val) {
1992
+ return inspect(val, {
1993
+ compact: false,
1994
+ customInspect: false,
1995
+ depth: 1e3,
1996
+ maxArrayLength: Infinity,
1997
+ showHidden: false,
1998
+ breakLength: Infinity,
1999
+ showProxy: false,
2000
+ sorted: true,
2001
+ getters: true
2002
+ });
2003
+ }
2004
+ function createErrDiff(actual, expected, operator) {
2005
+ var other = "";
2006
+ var res = "";
2007
+ var lastPos = 0;
2008
+ var end = "";
2009
+ var skipped = false;
2010
+ var actualInspected = inspectValue(actual);
2011
+ var actualLines = actualInspected.split("\n");
2012
+ var expectedLines = inspectValue(expected).split("\n");
2013
+ var i = 0;
2014
+ var indicator = "";
2015
+ if (operator === "strictEqual" && _typeof(actual) === "object" && _typeof(expected) === "object" && actual !== null && expected !== null) {
2016
+ operator = "strictEqualObject";
2017
+ }
2018
+ if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {
2019
+ var inputLength = actualLines[0].length + expectedLines[0].length;
2020
+ if (inputLength <= kMaxShortLength) {
2021
+ if ((_typeof(actual) !== "object" || actual === null) && (_typeof(expected) !== "object" || expected === null) && (actual !== 0 || expected !== 0)) {
2022
+ return "".concat(kReadableOperator[operator], "\n\n") + "".concat(actualLines[0], " !== ").concat(expectedLines[0], "\n");
2023
+ }
2024
+ } else if (operator !== "strictEqualObject") {
2025
+ var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80;
2026
+ if (inputLength < maxLength) {
2027
+ while (actualLines[0][i] === expectedLines[0][i]) {
2028
+ i++;
2029
+ }
2030
+ if (i > 2) {
2031
+ indicator = "\n ".concat(repeat(" ", i), "^");
2032
+ i = 0;
2033
+ }
2034
+ }
2035
+ }
2036
+ }
2037
+ var a = actualLines[actualLines.length - 1];
2038
+ var b = expectedLines[expectedLines.length - 1];
2039
+ while (a === b) {
2040
+ if (i++ < 2) {
2041
+ end = "\n ".concat(a).concat(end);
2042
+ } else {
2043
+ other = a;
2044
+ }
2045
+ actualLines.pop();
2046
+ expectedLines.pop();
2047
+ if (actualLines.length === 0 || expectedLines.length === 0)
2048
+ break;
2049
+ a = actualLines[actualLines.length - 1];
2050
+ b = expectedLines[expectedLines.length - 1];
2051
+ }
2052
+ var maxLines = Math.max(actualLines.length, expectedLines.length);
2053
+ if (maxLines === 0) {
2054
+ var _actualLines = actualInspected.split("\n");
2055
+ if (_actualLines.length > 30) {
2056
+ _actualLines[26] = "".concat(blue, "...").concat(white);
2057
+ while (_actualLines.length > 27) {
2058
+ _actualLines.pop();
2059
+ }
2060
+ }
2061
+ return "".concat(kReadableOperator.notIdentical, "\n\n").concat(_actualLines.join("\n"), "\n");
2062
+ }
2063
+ if (i > 3) {
2064
+ end = "\n".concat(blue, "...").concat(white).concat(end);
2065
+ skipped = true;
2066
+ }
2067
+ if (other !== "") {
2068
+ end = "\n ".concat(other).concat(end);
2069
+ other = "";
2070
+ }
2071
+ var printedLines = 0;
2072
+ var msg = kReadableOperator[operator] + "\n".concat(green, "+ actual").concat(white, " ").concat(red, "- expected").concat(white);
2073
+ var skippedMsg = " ".concat(blue, "...").concat(white, " Lines skipped");
2074
+ for (i = 0; i < maxLines; i++) {
2075
+ var cur = i - lastPos;
2076
+ if (actualLines.length < i + 1) {
2077
+ if (cur > 1 && i > 2) {
2078
+ if (cur > 4) {
2079
+ res += "\n".concat(blue, "...").concat(white);
2080
+ skipped = true;
2081
+ } else if (cur > 3) {
2082
+ res += "\n ".concat(expectedLines[i - 2]);
2083
+ printedLines++;
2084
+ }
2085
+ res += "\n ".concat(expectedLines[i - 1]);
2086
+ printedLines++;
2087
+ }
2088
+ lastPos = i;
2089
+ other += "\n".concat(red, "-").concat(white, " ").concat(expectedLines[i]);
2090
+ printedLines++;
2091
+ } else if (expectedLines.length < i + 1) {
2092
+ if (cur > 1 && i > 2) {
2093
+ if (cur > 4) {
2094
+ res += "\n".concat(blue, "...").concat(white);
2095
+ skipped = true;
2096
+ } else if (cur > 3) {
2097
+ res += "\n ".concat(actualLines[i - 2]);
2098
+ printedLines++;
2099
+ }
2100
+ res += "\n ".concat(actualLines[i - 1]);
2101
+ printedLines++;
2102
+ }
2103
+ lastPos = i;
2104
+ res += "\n".concat(green, "+").concat(white, " ").concat(actualLines[i]);
2105
+ printedLines++;
2106
+ } else {
2107
+ var expectedLine = expectedLines[i];
2108
+ var actualLine = actualLines[i];
2109
+ var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ",") || actualLine.slice(0, -1) !== expectedLine);
2110
+ if (divergingLines && endsWith(expectedLine, ",") && expectedLine.slice(0, -1) === actualLine) {
2111
+ divergingLines = false;
2112
+ actualLine += ",";
2113
+ }
2114
+ if (divergingLines) {
2115
+ if (cur > 1 && i > 2) {
2116
+ if (cur > 4) {
2117
+ res += "\n".concat(blue, "...").concat(white);
2118
+ skipped = true;
2119
+ } else if (cur > 3) {
2120
+ res += "\n ".concat(actualLines[i - 2]);
2121
+ printedLines++;
2122
+ }
2123
+ res += "\n ".concat(actualLines[i - 1]);
2124
+ printedLines++;
2125
+ }
2126
+ lastPos = i;
2127
+ res += "\n".concat(green, "+").concat(white, " ").concat(actualLine);
2128
+ other += "\n".concat(red, "-").concat(white, " ").concat(expectedLine);
2129
+ printedLines += 2;
2130
+ } else {
2131
+ res += other;
2132
+ other = "";
2133
+ if (cur === 1 || i === 0) {
2134
+ res += "\n ".concat(actualLine);
2135
+ printedLines++;
2136
+ }
2137
+ }
2138
+ }
2139
+ if (printedLines > 20 && i < maxLines - 2) {
2140
+ return "".concat(msg).concat(skippedMsg, "\n").concat(res, "\n").concat(blue, "...").concat(white).concat(other, "\n") + "".concat(blue, "...").concat(white);
2141
+ }
2142
+ }
2143
+ return "".concat(msg).concat(skipped ? skippedMsg : "", "\n").concat(res).concat(other).concat(end).concat(indicator);
2144
+ }
2145
+ var AssertionError = /* @__PURE__ */ function(_Error) {
2146
+ _inherits(AssertionError2, _Error);
2147
+ function AssertionError2(options) {
2148
+ var _this;
2149
+ _classCallCheck(this, AssertionError2);
2150
+ if (_typeof(options) !== "object" || options === null) {
2151
+ throw new ERR_INVALID_ARG_TYPE("options", "Object", options);
2152
+ }
2153
+ var message = options.message, operator = options.operator, stackStartFn = options.stackStartFn;
2154
+ var actual = options.actual, expected = options.expected;
2155
+ var limit = Error.stackTraceLimit;
2156
+ Error.stackTraceLimit = 0;
2157
+ if (message != null) {
2158
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError2).call(this, String(message)));
2159
+ } else {
2160
+ if (process.stderr && process.stderr.isTTY) {
2161
+ if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {
2162
+ blue = "\x1B[34m";
2163
+ green = "\x1B[32m";
2164
+ white = "\x1B[39m";
2165
+ red = "\x1B[31m";
2166
+ } else {
2167
+ blue = "";
2168
+ green = "";
2169
+ white = "";
2170
+ red = "";
2171
+ }
2172
+ }
2173
+ if (_typeof(actual) === "object" && actual !== null && _typeof(expected) === "object" && expected !== null && "stack" in actual && actual instanceof Error && "stack" in expected && expected instanceof Error) {
2174
+ actual = copyError(actual);
2175
+ expected = copyError(expected);
2176
+ }
2177
+ if (operator === "deepStrictEqual" || operator === "strictEqual") {
2178
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError2).call(this, createErrDiff(actual, expected, operator)));
2179
+ } else if (operator === "notDeepStrictEqual" || operator === "notStrictEqual") {
2180
+ var base = kReadableOperator[operator];
2181
+ var res = inspectValue(actual).split("\n");
2182
+ if (operator === "notStrictEqual" && _typeof(actual) === "object" && actual !== null) {
2183
+ base = kReadableOperator.notStrictEqualObject;
2184
+ }
2185
+ if (res.length > 30) {
2186
+ res[26] = "".concat(blue, "...").concat(white);
2187
+ while (res.length > 27) {
2188
+ res.pop();
2189
+ }
2190
+ }
2191
+ if (res.length === 1) {
2192
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError2).call(this, "".concat(base, " ").concat(res[0])));
2193
+ } else {
2194
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError2).call(this, "".concat(base, "\n\n").concat(res.join("\n"), "\n")));
2195
+ }
2196
+ } else {
2197
+ var _res = inspectValue(actual);
2198
+ var other = "";
2199
+ var knownOperators = kReadableOperator[operator];
2200
+ if (operator === "notDeepEqual" || operator === "notEqual") {
2201
+ _res = "".concat(kReadableOperator[operator], "\n\n").concat(_res);
2202
+ if (_res.length > 1024) {
2203
+ _res = "".concat(_res.slice(0, 1021), "...");
2204
+ }
2205
+ } else {
2206
+ other = "".concat(inspectValue(expected));
2207
+ if (_res.length > 512) {
2208
+ _res = "".concat(_res.slice(0, 509), "...");
2209
+ }
2210
+ if (other.length > 512) {
2211
+ other = "".concat(other.slice(0, 509), "...");
2212
+ }
2213
+ if (operator === "deepEqual" || operator === "equal") {
2214
+ _res = "".concat(knownOperators, "\n\n").concat(_res, "\n\nshould equal\n\n");
2215
+ } else {
2216
+ other = " ".concat(operator, " ").concat(other);
2217
+ }
2218
+ }
2219
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError2).call(this, "".concat(_res).concat(other)));
2220
+ }
2221
+ }
2222
+ Error.stackTraceLimit = limit;
2223
+ _this.generatedMessage = !message;
2224
+ Object.defineProperty(_assertThisInitialized(_this), "name", {
2225
+ value: "AssertionError [ERR_ASSERTION]",
2226
+ enumerable: false,
2227
+ writable: true,
2228
+ configurable: true
2229
+ });
2230
+ _this.code = "ERR_ASSERTION";
2231
+ _this.actual = actual;
2232
+ _this.expected = expected;
2233
+ _this.operator = operator;
2234
+ if (Error.captureStackTrace) {
2235
+ Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);
2236
+ }
2237
+ _this.stack;
2238
+ _this.name = "AssertionError";
2239
+ return _possibleConstructorReturn(_this);
2240
+ }
2241
+ _createClass(AssertionError2, [{
2242
+ key: "toString",
2243
+ value: function toString() {
2244
+ return "".concat(this.name, " [").concat(this.code, "]: ").concat(this.message);
2245
+ }
2246
+ }, {
2247
+ key: inspect.custom,
2248
+ value: function value(recurseTimes, ctx) {
2249
+ return inspect(this, _objectSpread({}, ctx, {
2250
+ customInspect: false,
2251
+ depth: 0
2252
+ }));
2253
+ }
2254
+ }]);
2255
+ return AssertionError2;
2256
+ }(_wrapNativeSuper(Error));
2257
+ module2.exports = AssertionError;
2258
+ }
2259
+ });
2260
+
2261
+ // ../../../common/temp/node_modules/.pnpm/es6-object-assign@1.1.0/node_modules/es6-object-assign/index.js
2262
+ var require_es6_object_assign = __commonJS({
2263
+ "../../../common/temp/node_modules/.pnpm/es6-object-assign@1.1.0/node_modules/es6-object-assign/index.js"(exports2, module2) {
2264
+ "use strict";
2265
+ function assign(target, firstSource) {
2266
+ if (target === void 0 || target === null) {
2267
+ throw new TypeError("Cannot convert first argument to object");
2268
+ }
2269
+ var to = Object(target);
2270
+ for (var i = 1; i < arguments.length; i++) {
2271
+ var nextSource = arguments[i];
2272
+ if (nextSource === void 0 || nextSource === null) {
2273
+ continue;
2274
+ }
2275
+ var keysArray = Object.keys(Object(nextSource));
2276
+ for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
2277
+ var nextKey = keysArray[nextIndex];
2278
+ var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
2279
+ if (desc !== void 0 && desc.enumerable) {
2280
+ to[nextKey] = nextSource[nextKey];
2281
+ }
2282
+ }
2283
+ }
2284
+ return to;
2285
+ }
2286
+ function polyfill() {
2287
+ if (!Object.assign) {
2288
+ Object.defineProperty(Object, "assign", {
2289
+ enumerable: false,
2290
+ configurable: true,
2291
+ writable: true,
2292
+ value: assign
2293
+ });
2294
+ }
2295
+ }
2296
+ module2.exports = {
2297
+ assign,
2298
+ polyfill
2299
+ };
2300
+ }
2301
+ });
2302
+
2303
+ // ../../../common/temp/node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js
2304
+ var require_isArguments = __commonJS({
2305
+ "../../../common/temp/node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js"(exports2, module2) {
2306
+ "use strict";
2307
+ var toStr = Object.prototype.toString;
2308
+ module2.exports = function isArguments(value) {
2309
+ var str = toStr.call(value);
2310
+ var isArgs = str === "[object Arguments]";
2311
+ if (!isArgs) {
2312
+ isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]";
2313
+ }
2314
+ return isArgs;
2315
+ };
2316
+ }
2317
+ });
2318
+
2319
+ // ../../../common/temp/node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js
2320
+ var require_implementation2 = __commonJS({
2321
+ "../../../common/temp/node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js"(exports2, module2) {
2322
+ "use strict";
2323
+ var keysShim;
2324
+ if (!Object.keys) {
2325
+ has = Object.prototype.hasOwnProperty;
2326
+ toStr = Object.prototype.toString;
2327
+ isArgs = require_isArguments();
2328
+ isEnumerable = Object.prototype.propertyIsEnumerable;
2329
+ hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString");
2330
+ hasProtoEnumBug = isEnumerable.call(function() {
2331
+ }, "prototype");
2332
+ dontEnums = [
2333
+ "toString",
2334
+ "toLocaleString",
2335
+ "valueOf",
2336
+ "hasOwnProperty",
2337
+ "isPrototypeOf",
2338
+ "propertyIsEnumerable",
2339
+ "constructor"
2340
+ ];
2341
+ equalsConstructorPrototype = function(o) {
2342
+ var ctor = o.constructor;
2343
+ return ctor && ctor.prototype === o;
2344
+ };
2345
+ excludedKeys = {
2346
+ $applicationCache: true,
2347
+ $console: true,
2348
+ $external: true,
2349
+ $frame: true,
2350
+ $frameElement: true,
2351
+ $frames: true,
2352
+ $innerHeight: true,
2353
+ $innerWidth: true,
2354
+ $onmozfullscreenchange: true,
2355
+ $onmozfullscreenerror: true,
2356
+ $outerHeight: true,
2357
+ $outerWidth: true,
2358
+ $pageXOffset: true,
2359
+ $pageYOffset: true,
2360
+ $parent: true,
2361
+ $scrollLeft: true,
2362
+ $scrollTop: true,
2363
+ $scrollX: true,
2364
+ $scrollY: true,
2365
+ $self: true,
2366
+ $webkitIndexedDB: true,
2367
+ $webkitStorageInfo: true,
2368
+ $window: true
2369
+ };
2370
+ hasAutomationEqualityBug = function() {
2371
+ if (typeof window === "undefined") {
2372
+ return false;
2373
+ }
2374
+ for (var k in window) {
2375
+ try {
2376
+ if (!excludedKeys["$" + k] && has.call(window, k) && window[k] !== null && typeof window[k] === "object") {
2377
+ try {
2378
+ equalsConstructorPrototype(window[k]);
2379
+ } catch (e) {
2380
+ return true;
2381
+ }
2382
+ }
2383
+ } catch (e) {
2384
+ return true;
2385
+ }
2386
+ }
2387
+ return false;
2388
+ }();
2389
+ equalsConstructorPrototypeIfNotBuggy = function(o) {
2390
+ if (typeof window === "undefined" || !hasAutomationEqualityBug) {
2391
+ return equalsConstructorPrototype(o);
2392
+ }
2393
+ try {
2394
+ return equalsConstructorPrototype(o);
2395
+ } catch (e) {
2396
+ return false;
2397
+ }
2398
+ };
2399
+ keysShim = function keys(object) {
2400
+ var isObject = object !== null && typeof object === "object";
2401
+ var isFunction = toStr.call(object) === "[object Function]";
2402
+ var isArguments = isArgs(object);
2403
+ var isString = isObject && toStr.call(object) === "[object String]";
2404
+ var theKeys = [];
2405
+ if (!isObject && !isFunction && !isArguments) {
2406
+ throw new TypeError("Object.keys called on a non-object");
2407
+ }
2408
+ var skipProto = hasProtoEnumBug && isFunction;
2409
+ if (isString && object.length > 0 && !has.call(object, 0)) {
2410
+ for (var i = 0; i < object.length; ++i) {
2411
+ theKeys.push(String(i));
2412
+ }
2413
+ }
2414
+ if (isArguments && object.length > 0) {
2415
+ for (var j = 0; j < object.length; ++j) {
2416
+ theKeys.push(String(j));
2417
+ }
2418
+ } else {
2419
+ for (var name in object) {
2420
+ if (!(skipProto && name === "prototype") && has.call(object, name)) {
2421
+ theKeys.push(String(name));
2422
+ }
2423
+ }
2424
+ }
2425
+ if (hasDontEnumBug) {
2426
+ var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
2427
+ for (var k = 0; k < dontEnums.length; ++k) {
2428
+ if (!(skipConstructor && dontEnums[k] === "constructor") && has.call(object, dontEnums[k])) {
2429
+ theKeys.push(dontEnums[k]);
2430
+ }
2431
+ }
2432
+ }
2433
+ return theKeys;
2434
+ };
2435
+ }
2436
+ var has;
2437
+ var toStr;
2438
+ var isArgs;
2439
+ var isEnumerable;
2440
+ var hasDontEnumBug;
2441
+ var hasProtoEnumBug;
2442
+ var dontEnums;
2443
+ var equalsConstructorPrototype;
2444
+ var excludedKeys;
2445
+ var hasAutomationEqualityBug;
2446
+ var equalsConstructorPrototypeIfNotBuggy;
2447
+ module2.exports = keysShim;
2448
+ }
2449
+ });
2450
+
2451
+ // ../../../common/temp/node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js
2452
+ var require_object_keys = __commonJS({
2453
+ "../../../common/temp/node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js"(exports2, module2) {
2454
+ "use strict";
2455
+ var slice = Array.prototype.slice;
2456
+ var isArgs = require_isArguments();
2457
+ var origKeys = Object.keys;
2458
+ var keysShim = origKeys ? function keys(o) {
2459
+ return origKeys(o);
2460
+ } : require_implementation2();
2461
+ var originalKeys = Object.keys;
2462
+ keysShim.shim = function shimObjectKeys() {
2463
+ if (Object.keys) {
2464
+ var keysWorksWithArguments = function() {
2465
+ var args = Object.keys(arguments);
2466
+ return args && args.length === arguments.length;
2467
+ }(1, 2);
2468
+ if (!keysWorksWithArguments) {
2469
+ Object.keys = function keys(object) {
2470
+ if (isArgs(object)) {
2471
+ return originalKeys(slice.call(object));
2472
+ }
2473
+ return originalKeys(object);
2474
+ };
2475
+ }
2476
+ } else {
2477
+ Object.keys = keysShim;
2478
+ }
2479
+ return Object.keys || keysShim;
2480
+ };
2481
+ module2.exports = keysShim;
2482
+ }
2483
+ });
2484
+
2485
+ // ../../../common/temp/node_modules/.pnpm/define-properties@1.1.3/node_modules/define-properties/index.js
2486
+ var require_define_properties = __commonJS({
2487
+ "../../../common/temp/node_modules/.pnpm/define-properties@1.1.3/node_modules/define-properties/index.js"(exports2, module2) {
2488
+ "use strict";
2489
+ var keys = require_object_keys();
2490
+ var hasSymbols = typeof Symbol === "function" && typeof Symbol("foo") === "symbol";
2491
+ var toStr = Object.prototype.toString;
2492
+ var concat = Array.prototype.concat;
2493
+ var origDefineProperty = Object.defineProperty;
2494
+ var isFunction = function(fn) {
2495
+ return typeof fn === "function" && toStr.call(fn) === "[object Function]";
2496
+ };
2497
+ var arePropertyDescriptorsSupported = function() {
2498
+ var obj = {};
2499
+ try {
2500
+ origDefineProperty(obj, "x", { enumerable: false, value: obj });
2501
+ for (var _ in obj) {
2502
+ return false;
2503
+ }
2504
+ return obj.x === obj;
2505
+ } catch (e) {
2506
+ return false;
2507
+ }
2508
+ };
2509
+ var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
2510
+ var defineProperty = function(object, name, value, predicate) {
2511
+ if (name in object && (!isFunction(predicate) || !predicate())) {
2512
+ return;
2513
+ }
2514
+ if (supportsDescriptors) {
2515
+ origDefineProperty(object, name, {
2516
+ configurable: true,
2517
+ enumerable: false,
2518
+ value,
2519
+ writable: true
2520
+ });
2521
+ } else {
2522
+ object[name] = value;
2523
+ }
2524
+ };
2525
+ var defineProperties = function(object, map) {
2526
+ var predicates = arguments.length > 2 ? arguments[2] : {};
2527
+ var props = keys(map);
2528
+ if (hasSymbols) {
2529
+ props = concat.call(props, Object.getOwnPropertySymbols(map));
2530
+ }
2531
+ for (var i = 0; i < props.length; i += 1) {
2532
+ defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
2533
+ }
2534
+ };
2535
+ defineProperties.supportsDescriptors = !!supportsDescriptors;
2536
+ module2.exports = defineProperties;
2537
+ }
2538
+ });
2539
+
2540
+ // ../../../common/temp/node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/implementation.js
2541
+ var require_implementation3 = __commonJS({
2542
+ "../../../common/temp/node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/implementation.js"(exports2, module2) {
2543
+ "use strict";
2544
+ var numberIsNaN = function(value) {
2545
+ return value !== value;
2546
+ };
2547
+ module2.exports = function is(a, b) {
2548
+ if (a === 0 && b === 0) {
2549
+ return 1 / a === 1 / b;
2550
+ }
2551
+ if (a === b) {
2552
+ return true;
2553
+ }
2554
+ if (numberIsNaN(a) && numberIsNaN(b)) {
2555
+ return true;
2556
+ }
2557
+ return false;
2558
+ };
2559
+ }
2560
+ });
2561
+
2562
+ // ../../../common/temp/node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/polyfill.js
2563
+ var require_polyfill = __commonJS({
2564
+ "../../../common/temp/node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/polyfill.js"(exports2, module2) {
2565
+ "use strict";
2566
+ var implementation = require_implementation3();
2567
+ module2.exports = function getPolyfill() {
2568
+ return typeof Object.is === "function" ? Object.is : implementation;
2569
+ };
2570
+ }
2571
+ });
2572
+
2573
+ // ../../../common/temp/node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/shim.js
2574
+ var require_shim = __commonJS({
2575
+ "../../../common/temp/node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/shim.js"(exports2, module2) {
2576
+ "use strict";
2577
+ var getPolyfill = require_polyfill();
2578
+ var define = require_define_properties();
2579
+ module2.exports = function shimObjectIs() {
2580
+ var polyfill = getPolyfill();
2581
+ define(Object, { is: polyfill }, {
2582
+ is: function testObjectIs() {
2583
+ return Object.is !== polyfill;
2584
+ }
2585
+ });
2586
+ return polyfill;
2587
+ };
2588
+ }
2589
+ });
2590
+
2591
+ // ../../../common/temp/node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/index.js
2592
+ var require_object_is = __commonJS({
2593
+ "../../../common/temp/node_modules/.pnpm/object-is@1.1.5/node_modules/object-is/index.js"(exports2, module2) {
2594
+ "use strict";
2595
+ var define = require_define_properties();
2596
+ var callBind = require_call_bind();
2597
+ var implementation = require_implementation3();
2598
+ var getPolyfill = require_polyfill();
2599
+ var shim = require_shim();
2600
+ var polyfill = callBind(getPolyfill(), Object);
2601
+ define(polyfill, {
2602
+ getPolyfill,
2603
+ implementation,
2604
+ shim
2605
+ });
2606
+ module2.exports = polyfill;
2607
+ }
2608
+ });
2609
+
2610
+ // ../../../common/temp/node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/implementation.js
2611
+ var require_implementation4 = __commonJS({
2612
+ "../../../common/temp/node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/implementation.js"(exports2, module2) {
2613
+ "use strict";
2614
+ module2.exports = function isNaN2(value) {
2615
+ return value !== value;
2616
+ };
2617
+ }
2618
+ });
2619
+
2620
+ // ../../../common/temp/node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/polyfill.js
2621
+ var require_polyfill2 = __commonJS({
2622
+ "../../../common/temp/node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/polyfill.js"(exports2, module2) {
2623
+ "use strict";
2624
+ var implementation = require_implementation4();
2625
+ module2.exports = function getPolyfill() {
2626
+ if (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN("a")) {
2627
+ return Number.isNaN;
2628
+ }
2629
+ return implementation;
2630
+ };
2631
+ }
2632
+ });
2633
+
2634
+ // ../../../common/temp/node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/shim.js
2635
+ var require_shim2 = __commonJS({
2636
+ "../../../common/temp/node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/shim.js"(exports2, module2) {
2637
+ "use strict";
2638
+ var define = require_define_properties();
2639
+ var getPolyfill = require_polyfill2();
2640
+ module2.exports = function shimNumberIsNaN() {
2641
+ var polyfill = getPolyfill();
2642
+ define(Number, { isNaN: polyfill }, {
2643
+ isNaN: function testIsNaN() {
2644
+ return Number.isNaN !== polyfill;
2645
+ }
2646
+ });
2647
+ return polyfill;
2648
+ };
2649
+ }
2650
+ });
2651
+
2652
+ // ../../../common/temp/node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/index.js
2653
+ var require_is_nan = __commonJS({
2654
+ "../../../common/temp/node_modules/.pnpm/is-nan@1.3.2/node_modules/is-nan/index.js"(exports2, module2) {
2655
+ "use strict";
2656
+ var callBind = require_call_bind();
2657
+ var define = require_define_properties();
2658
+ var implementation = require_implementation4();
2659
+ var getPolyfill = require_polyfill2();
2660
+ var shim = require_shim2();
2661
+ var polyfill = callBind(getPolyfill(), Number);
2662
+ define(polyfill, {
2663
+ getPolyfill,
2664
+ implementation,
2665
+ shim
2666
+ });
2667
+ module2.exports = polyfill;
2668
+ }
2669
+ });
2670
+
2671
+ // ../../../common/temp/node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/internal/util/comparisons.js
2672
+ var require_comparisons = __commonJS({
2673
+ "../../../common/temp/node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/internal/util/comparisons.js"(exports2, module2) {
2674
+ "use strict";
2675
+ function _slicedToArray(arr, i) {
2676
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
2677
+ }
2678
+ function _nonIterableRest() {
2679
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
2680
+ }
2681
+ function _iterableToArrayLimit(arr, i) {
2682
+ var _arr = [];
2683
+ var _n = true;
2684
+ var _d = false;
2685
+ var _e = void 0;
2686
+ try {
2687
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
2688
+ _arr.push(_s.value);
2689
+ if (i && _arr.length === i)
2690
+ break;
2691
+ }
2692
+ } catch (err) {
2693
+ _d = true;
2694
+ _e = err;
2695
+ } finally {
2696
+ try {
2697
+ if (!_n && _i["return"] != null)
2698
+ _i["return"]();
2699
+ } finally {
2700
+ if (_d)
2701
+ throw _e;
2702
+ }
2703
+ }
2704
+ return _arr;
2705
+ }
2706
+ function _arrayWithHoles(arr) {
2707
+ if (Array.isArray(arr))
2708
+ return arr;
2709
+ }
2710
+ function _typeof(obj) {
2711
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
2712
+ _typeof = function _typeof2(obj2) {
2713
+ return typeof obj2;
2714
+ };
2715
+ } else {
2716
+ _typeof = function _typeof2(obj2) {
2717
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
2718
+ };
2719
+ }
2720
+ return _typeof(obj);
2721
+ }
2722
+ var regexFlagsSupported = /a/g.flags !== void 0;
2723
+ var arrayFromSet = function arrayFromSet2(set) {
2724
+ var array = [];
2725
+ set.forEach(function(value) {
2726
+ return array.push(value);
2727
+ });
2728
+ return array;
2729
+ };
2730
+ var arrayFromMap = function arrayFromMap2(map) {
2731
+ var array = [];
2732
+ map.forEach(function(value, key) {
2733
+ return array.push([key, value]);
2734
+ });
2735
+ return array;
2736
+ };
2737
+ var objectIs = Object.is ? Object.is : require_object_is();
2738
+ var objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function() {
2739
+ return [];
2740
+ };
2741
+ var numberIsNaN = Number.isNaN ? Number.isNaN : require_is_nan();
2742
+ function uncurryThis(f) {
2743
+ return f.call.bind(f);
2744
+ }
2745
+ var hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);
2746
+ var propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);
2747
+ var objectToString = uncurryThis(Object.prototype.toString);
2748
+ var _require$types = require_util().types;
2749
+ var isAnyArrayBuffer = _require$types.isAnyArrayBuffer;
2750
+ var isArrayBufferView = _require$types.isArrayBufferView;
2751
+ var isDate = _require$types.isDate;
2752
+ var isMap = _require$types.isMap;
2753
+ var isRegExp = _require$types.isRegExp;
2754
+ var isSet = _require$types.isSet;
2755
+ var isNativeError = _require$types.isNativeError;
2756
+ var isBoxedPrimitive = _require$types.isBoxedPrimitive;
2757
+ var isNumberObject = _require$types.isNumberObject;
2758
+ var isStringObject = _require$types.isStringObject;
2759
+ var isBooleanObject = _require$types.isBooleanObject;
2760
+ var isBigIntObject = _require$types.isBigIntObject;
2761
+ var isSymbolObject = _require$types.isSymbolObject;
2762
+ var isFloat32Array = _require$types.isFloat32Array;
2763
+ var isFloat64Array = _require$types.isFloat64Array;
2764
+ function isNonIndex(key) {
2765
+ if (key.length === 0 || key.length > 10)
2766
+ return true;
2767
+ for (var i = 0; i < key.length; i++) {
2768
+ var code = key.charCodeAt(i);
2769
+ if (code < 48 || code > 57)
2770
+ return true;
2771
+ }
2772
+ return key.length === 10 && key >= Math.pow(2, 32);
2773
+ }
2774
+ function getOwnNonIndexProperties(value) {
2775
+ return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));
2776
+ }
2777
+ function compare(a, b) {
2778
+ if (a === b) {
2779
+ return 0;
2780
+ }
2781
+ var x = a.length;
2782
+ var y = b.length;
2783
+ for (var i = 0, len = Math.min(x, y); i < len; ++i) {
2784
+ if (a[i] !== b[i]) {
2785
+ x = a[i];
2786
+ y = b[i];
2787
+ break;
2788
+ }
2789
+ }
2790
+ if (x < y) {
2791
+ return -1;
2792
+ }
2793
+ if (y < x) {
2794
+ return 1;
2795
+ }
2796
+ return 0;
2797
+ }
2798
+ var ONLY_ENUMERABLE = void 0;
2799
+ var kStrict = true;
2800
+ var kLoose = false;
2801
+ var kNoIterator = 0;
2802
+ var kIsArray = 1;
2803
+ var kIsSet = 2;
2804
+ var kIsMap = 3;
2805
+ function areSimilarRegExps(a, b) {
2806
+ return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);
2807
+ }
2808
+ function areSimilarFloatArrays(a, b) {
2809
+ if (a.byteLength !== b.byteLength) {
2810
+ return false;
2811
+ }
2812
+ for (var offset = 0; offset < a.byteLength; offset++) {
2813
+ if (a[offset] !== b[offset]) {
2814
+ return false;
2815
+ }
2816
+ }
2817
+ return true;
2818
+ }
2819
+ function areSimilarTypedArrays(a, b) {
2820
+ if (a.byteLength !== b.byteLength) {
2821
+ return false;
2822
+ }
2823
+ return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;
2824
+ }
2825
+ function areEqualArrayBuffers(buf1, buf2) {
2826
+ return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;
2827
+ }
2828
+ function isEqualBoxedPrimitive(val1, val2) {
2829
+ if (isNumberObject(val1)) {
2830
+ return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));
2831
+ }
2832
+ if (isStringObject(val1)) {
2833
+ return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);
2834
+ }
2835
+ if (isBooleanObject(val1)) {
2836
+ return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);
2837
+ }
2838
+ if (isBigIntObject(val1)) {
2839
+ return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);
2840
+ }
2841
+ return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);
2842
+ }
2843
+ function innerDeepEqual(val1, val2, strict, memos) {
2844
+ if (val1 === val2) {
2845
+ if (val1 !== 0)
2846
+ return true;
2847
+ return strict ? objectIs(val1, val2) : true;
2848
+ }
2849
+ if (strict) {
2850
+ if (_typeof(val1) !== "object") {
2851
+ return typeof val1 === "number" && numberIsNaN(val1) && numberIsNaN(val2);
2852
+ }
2853
+ if (_typeof(val2) !== "object" || val1 === null || val2 === null) {
2854
+ return false;
2855
+ }
2856
+ if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) {
2857
+ return false;
2858
+ }
2859
+ } else {
2860
+ if (val1 === null || _typeof(val1) !== "object") {
2861
+ if (val2 === null || _typeof(val2) !== "object") {
2862
+ return val1 == val2;
2863
+ }
2864
+ return false;
2865
+ }
2866
+ if (val2 === null || _typeof(val2) !== "object") {
2867
+ return false;
2868
+ }
2869
+ }
2870
+ var val1Tag = objectToString(val1);
2871
+ var val2Tag = objectToString(val2);
2872
+ if (val1Tag !== val2Tag) {
2873
+ return false;
2874
+ }
2875
+ if (Array.isArray(val1)) {
2876
+ if (val1.length !== val2.length) {
2877
+ return false;
2878
+ }
2879
+ var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);
2880
+ var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);
2881
+ if (keys1.length !== keys2.length) {
2882
+ return false;
2883
+ }
2884
+ return keyCheck(val1, val2, strict, memos, kIsArray, keys1);
2885
+ }
2886
+ if (val1Tag === "[object Object]") {
2887
+ if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) {
2888
+ return false;
2889
+ }
2890
+ }
2891
+ if (isDate(val1)) {
2892
+ if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) {
2893
+ return false;
2894
+ }
2895
+ } else if (isRegExp(val1)) {
2896
+ if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {
2897
+ return false;
2898
+ }
2899
+ } else if (isNativeError(val1) || val1 instanceof Error) {
2900
+ if (val1.message !== val2.message || val1.name !== val2.name) {
2901
+ return false;
2902
+ }
2903
+ } else if (isArrayBufferView(val1)) {
2904
+ if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {
2905
+ if (!areSimilarFloatArrays(val1, val2)) {
2906
+ return false;
2907
+ }
2908
+ } else if (!areSimilarTypedArrays(val1, val2)) {
2909
+ return false;
2910
+ }
2911
+ var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);
2912
+ var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);
2913
+ if (_keys.length !== _keys2.length) {
2914
+ return false;
2915
+ }
2916
+ return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);
2917
+ } else if (isSet(val1)) {
2918
+ if (!isSet(val2) || val1.size !== val2.size) {
2919
+ return false;
2920
+ }
2921
+ return keyCheck(val1, val2, strict, memos, kIsSet);
2922
+ } else if (isMap(val1)) {
2923
+ if (!isMap(val2) || val1.size !== val2.size) {
2924
+ return false;
2925
+ }
2926
+ return keyCheck(val1, val2, strict, memos, kIsMap);
2927
+ } else if (isAnyArrayBuffer(val1)) {
2928
+ if (!areEqualArrayBuffers(val1, val2)) {
2929
+ return false;
2930
+ }
2931
+ } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {
2932
+ return false;
2933
+ }
2934
+ return keyCheck(val1, val2, strict, memos, kNoIterator);
2935
+ }
2936
+ function getEnumerables(val, keys) {
2937
+ return keys.filter(function(k) {
2938
+ return propertyIsEnumerable(val, k);
2939
+ });
2940
+ }
2941
+ function keyCheck(val1, val2, strict, memos, iterationType, aKeys) {
2942
+ if (arguments.length === 5) {
2943
+ aKeys = Object.keys(val1);
2944
+ var bKeys = Object.keys(val2);
2945
+ if (aKeys.length !== bKeys.length) {
2946
+ return false;
2947
+ }
2948
+ }
2949
+ var i = 0;
2950
+ for (; i < aKeys.length; i++) {
2951
+ if (!hasOwnProperty(val2, aKeys[i])) {
2952
+ return false;
2953
+ }
2954
+ }
2955
+ if (strict && arguments.length === 5) {
2956
+ var symbolKeysA = objectGetOwnPropertySymbols(val1);
2957
+ if (symbolKeysA.length !== 0) {
2958
+ var count = 0;
2959
+ for (i = 0; i < symbolKeysA.length; i++) {
2960
+ var key = symbolKeysA[i];
2961
+ if (propertyIsEnumerable(val1, key)) {
2962
+ if (!propertyIsEnumerable(val2, key)) {
2963
+ return false;
2964
+ }
2965
+ aKeys.push(key);
2966
+ count++;
2967
+ } else if (propertyIsEnumerable(val2, key)) {
2968
+ return false;
2969
+ }
2970
+ }
2971
+ var symbolKeysB = objectGetOwnPropertySymbols(val2);
2972
+ if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) {
2973
+ return false;
2974
+ }
2975
+ } else {
2976
+ var _symbolKeysB = objectGetOwnPropertySymbols(val2);
2977
+ if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) {
2978
+ return false;
2979
+ }
2980
+ }
2981
+ }
2982
+ if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) {
2983
+ return true;
2984
+ }
2985
+ if (memos === void 0) {
2986
+ memos = {
2987
+ val1: /* @__PURE__ */ new Map(),
2988
+ val2: /* @__PURE__ */ new Map(),
2989
+ position: 0
2990
+ };
2991
+ } else {
2992
+ var val2MemoA = memos.val1.get(val1);
2993
+ if (val2MemoA !== void 0) {
2994
+ var val2MemoB = memos.val2.get(val2);
2995
+ if (val2MemoB !== void 0) {
2996
+ return val2MemoA === val2MemoB;
2997
+ }
2998
+ }
2999
+ memos.position++;
3000
+ }
3001
+ memos.val1.set(val1, memos.position);
3002
+ memos.val2.set(val2, memos.position);
3003
+ var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);
3004
+ memos.val1.delete(val1);
3005
+ memos.val2.delete(val2);
3006
+ return areEq;
3007
+ }
3008
+ function setHasEqualElement(set, val1, strict, memo) {
3009
+ var setValues = arrayFromSet(set);
3010
+ for (var i = 0; i < setValues.length; i++) {
3011
+ var val2 = setValues[i];
3012
+ if (innerDeepEqual(val1, val2, strict, memo)) {
3013
+ set.delete(val2);
3014
+ return true;
3015
+ }
3016
+ }
3017
+ return false;
3018
+ }
3019
+ function findLooseMatchingPrimitives(prim) {
3020
+ switch (_typeof(prim)) {
3021
+ case "undefined":
3022
+ return null;
3023
+ case "object":
3024
+ return void 0;
3025
+ case "symbol":
3026
+ return false;
3027
+ case "string":
3028
+ prim = +prim;
3029
+ case "number":
3030
+ if (numberIsNaN(prim)) {
3031
+ return false;
3032
+ }
3033
+ }
3034
+ return true;
3035
+ }
3036
+ function setMightHaveLoosePrim(a, b, prim) {
3037
+ var altValue = findLooseMatchingPrimitives(prim);
3038
+ if (altValue != null)
3039
+ return altValue;
3040
+ return b.has(altValue) && !a.has(altValue);
3041
+ }
3042
+ function mapMightHaveLoosePrim(a, b, prim, item, memo) {
3043
+ var altValue = findLooseMatchingPrimitives(prim);
3044
+ if (altValue != null) {
3045
+ return altValue;
3046
+ }
3047
+ var curB = b.get(altValue);
3048
+ if (curB === void 0 && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) {
3049
+ return false;
3050
+ }
3051
+ return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);
3052
+ }
3053
+ function setEquiv(a, b, strict, memo) {
3054
+ var set = null;
3055
+ var aValues = arrayFromSet(a);
3056
+ for (var i = 0; i < aValues.length; i++) {
3057
+ var val = aValues[i];
3058
+ if (_typeof(val) === "object" && val !== null) {
3059
+ if (set === null) {
3060
+ set = /* @__PURE__ */ new Set();
3061
+ }
3062
+ set.add(val);
3063
+ } else if (!b.has(val)) {
3064
+ if (strict)
3065
+ return false;
3066
+ if (!setMightHaveLoosePrim(a, b, val)) {
3067
+ return false;
3068
+ }
3069
+ if (set === null) {
3070
+ set = /* @__PURE__ */ new Set();
3071
+ }
3072
+ set.add(val);
3073
+ }
3074
+ }
3075
+ if (set !== null) {
3076
+ var bValues = arrayFromSet(b);
3077
+ for (var _i = 0; _i < bValues.length; _i++) {
3078
+ var _val = bValues[_i];
3079
+ if (_typeof(_val) === "object" && _val !== null) {
3080
+ if (!setHasEqualElement(set, _val, strict, memo))
3081
+ return false;
3082
+ } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {
3083
+ return false;
3084
+ }
3085
+ }
3086
+ return set.size === 0;
3087
+ }
3088
+ return true;
3089
+ }
3090
+ function mapHasEqualEntry(set, map, key1, item1, strict, memo) {
3091
+ var setValues = arrayFromSet(set);
3092
+ for (var i = 0; i < setValues.length; i++) {
3093
+ var key2 = setValues[i];
3094
+ if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {
3095
+ set.delete(key2);
3096
+ return true;
3097
+ }
3098
+ }
3099
+ return false;
3100
+ }
3101
+ function mapEquiv(a, b, strict, memo) {
3102
+ var set = null;
3103
+ var aEntries = arrayFromMap(a);
3104
+ for (var i = 0; i < aEntries.length; i++) {
3105
+ var _aEntries$i = _slicedToArray(aEntries[i], 2), key = _aEntries$i[0], item1 = _aEntries$i[1];
3106
+ if (_typeof(key) === "object" && key !== null) {
3107
+ if (set === null) {
3108
+ set = /* @__PURE__ */ new Set();
3109
+ }
3110
+ set.add(key);
3111
+ } else {
3112
+ var item2 = b.get(key);
3113
+ if (item2 === void 0 && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {
3114
+ if (strict)
3115
+ return false;
3116
+ if (!mapMightHaveLoosePrim(a, b, key, item1, memo))
3117
+ return false;
3118
+ if (set === null) {
3119
+ set = /* @__PURE__ */ new Set();
3120
+ }
3121
+ set.add(key);
3122
+ }
3123
+ }
3124
+ }
3125
+ if (set !== null) {
3126
+ var bEntries = arrayFromMap(b);
3127
+ for (var _i2 = 0; _i2 < bEntries.length; _i2++) {
3128
+ var _bEntries$_i = _slicedToArray(bEntries[_i2], 2), key = _bEntries$_i[0], item = _bEntries$_i[1];
3129
+ if (_typeof(key) === "object" && key !== null) {
3130
+ if (!mapHasEqualEntry(set, a, key, item, strict, memo))
3131
+ return false;
3132
+ } else if (!strict && (!a.has(key) || !innerDeepEqual(a.get(key), item, false, memo)) && !mapHasEqualEntry(set, a, key, item, false, memo)) {
3133
+ return false;
3134
+ }
3135
+ }
3136
+ return set.size === 0;
3137
+ }
3138
+ return true;
3139
+ }
3140
+ function objEquiv(a, b, strict, keys, memos, iterationType) {
3141
+ var i = 0;
3142
+ if (iterationType === kIsSet) {
3143
+ if (!setEquiv(a, b, strict, memos)) {
3144
+ return false;
3145
+ }
3146
+ } else if (iterationType === kIsMap) {
3147
+ if (!mapEquiv(a, b, strict, memos)) {
3148
+ return false;
3149
+ }
3150
+ } else if (iterationType === kIsArray) {
3151
+ for (; i < a.length; i++) {
3152
+ if (hasOwnProperty(a, i)) {
3153
+ if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) {
3154
+ return false;
3155
+ }
3156
+ } else if (hasOwnProperty(b, i)) {
3157
+ return false;
3158
+ } else {
3159
+ var keysA = Object.keys(a);
3160
+ for (; i < keysA.length; i++) {
3161
+ var key = keysA[i];
3162
+ if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) {
3163
+ return false;
3164
+ }
3165
+ }
3166
+ if (keysA.length !== Object.keys(b).length) {
3167
+ return false;
3168
+ }
3169
+ return true;
3170
+ }
3171
+ }
3172
+ }
3173
+ for (i = 0; i < keys.length; i++) {
3174
+ var _key = keys[i];
3175
+ if (!innerDeepEqual(a[_key], b[_key], strict, memos)) {
3176
+ return false;
3177
+ }
3178
+ }
3179
+ return true;
3180
+ }
3181
+ function isDeepEqual(val1, val2) {
3182
+ return innerDeepEqual(val1, val2, kLoose);
3183
+ }
3184
+ function isDeepStrictEqual(val1, val2) {
3185
+ return innerDeepEqual(val1, val2, kStrict);
3186
+ }
3187
+ module2.exports = {
3188
+ isDeepEqual,
3189
+ isDeepStrictEqual
3190
+ };
3191
+ }
3192
+ });
3193
+
3194
+ // ../../../common/temp/node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/assert.js
3195
+ var require_assert = __commonJS({
3196
+ "../../../common/temp/node_modules/.pnpm/assert@2.0.0/node_modules/assert/build/assert.js"(exports2, module2) {
3197
+ "use strict";
3198
+ function _typeof(obj) {
3199
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
3200
+ _typeof = function _typeof2(obj2) {
3201
+ return typeof obj2;
3202
+ };
3203
+ } else {
3204
+ _typeof = function _typeof2(obj2) {
3205
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
3206
+ };
3207
+ }
3208
+ return _typeof(obj);
3209
+ }
3210
+ function _classCallCheck(instance, Constructor) {
3211
+ if (!(instance instanceof Constructor)) {
3212
+ throw new TypeError("Cannot call a class as a function");
3213
+ }
3214
+ }
3215
+ var _require = require_errors();
3216
+ var _require$codes = _require.codes;
3217
+ var ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT;
3218
+ var ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE;
3219
+ var ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE;
3220
+ var ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE;
3221
+ var ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
3222
+ var AssertionError = require_assertion_error();
3223
+ var _require2 = require_util();
3224
+ var inspect = _require2.inspect;
3225
+ var _require$types = require_util().types;
3226
+ var isPromise = _require$types.isPromise;
3227
+ var isRegExp = _require$types.isRegExp;
3228
+ var objectAssign = Object.assign ? Object.assign : require_es6_object_assign().assign;
3229
+ var objectIs = Object.is ? Object.is : require_object_is();
3230
+ var isDeepEqual;
3231
+ var isDeepStrictEqual;
3232
+ function lazyLoadComparison() {
3233
+ var comparison = require_comparisons();
3234
+ isDeepEqual = comparison.isDeepEqual;
3235
+ isDeepStrictEqual = comparison.isDeepStrictEqual;
3236
+ }
3237
+ var warned = false;
3238
+ var assert5 = module2.exports = ok;
3239
+ var NO_EXCEPTION_SENTINEL = {};
3240
+ function innerFail(obj) {
3241
+ if (obj.message instanceof Error)
3242
+ throw obj.message;
3243
+ throw new AssertionError(obj);
3244
+ }
3245
+ function fail(actual, expected, message, operator, stackStartFn) {
3246
+ var argsLen = arguments.length;
3247
+ var internalMessage;
3248
+ if (argsLen === 0) {
3249
+ internalMessage = "Failed";
3250
+ } else if (argsLen === 1) {
3251
+ message = actual;
3252
+ actual = void 0;
3253
+ } else {
3254
+ if (warned === false) {
3255
+ warned = true;
3256
+ var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);
3257
+ warn("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.", "DeprecationWarning", "DEP0094");
3258
+ }
3259
+ if (argsLen === 2)
3260
+ operator = "!=";
3261
+ }
3262
+ if (message instanceof Error)
3263
+ throw message;
3264
+ var errArgs = {
3265
+ actual,
3266
+ expected,
3267
+ operator: operator === void 0 ? "fail" : operator,
3268
+ stackStartFn: stackStartFn || fail
3269
+ };
3270
+ if (message !== void 0) {
3271
+ errArgs.message = message;
3272
+ }
3273
+ var err = new AssertionError(errArgs);
3274
+ if (internalMessage) {
3275
+ err.message = internalMessage;
3276
+ err.generatedMessage = true;
3277
+ }
3278
+ throw err;
3279
+ }
3280
+ assert5.fail = fail;
3281
+ assert5.AssertionError = AssertionError;
3282
+ function innerOk(fn, argLen, value, message) {
3283
+ if (!value) {
3284
+ var generatedMessage = false;
3285
+ if (argLen === 0) {
3286
+ generatedMessage = true;
3287
+ message = "No value argument passed to `assert.ok()`";
3288
+ } else if (message instanceof Error) {
3289
+ throw message;
3290
+ }
3291
+ var err = new AssertionError({
3292
+ actual: value,
3293
+ expected: true,
3294
+ message,
3295
+ operator: "==",
3296
+ stackStartFn: fn
3297
+ });
3298
+ err.generatedMessage = generatedMessage;
3299
+ throw err;
3300
+ }
3301
+ }
3302
+ function ok() {
3303
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3304
+ args[_key] = arguments[_key];
3305
+ }
3306
+ innerOk.apply(void 0, [ok, args.length].concat(args));
3307
+ }
3308
+ assert5.ok = ok;
3309
+ assert5.equal = function equal(actual, expected, message) {
3310
+ if (arguments.length < 2) {
3311
+ throw new ERR_MISSING_ARGS("actual", "expected");
3312
+ }
3313
+ if (actual != expected) {
3314
+ innerFail({
3315
+ actual,
3316
+ expected,
3317
+ message,
3318
+ operator: "==",
3319
+ stackStartFn: equal
3320
+ });
3321
+ }
3322
+ };
3323
+ assert5.notEqual = function notEqual(actual, expected, message) {
3324
+ if (arguments.length < 2) {
3325
+ throw new ERR_MISSING_ARGS("actual", "expected");
3326
+ }
3327
+ if (actual == expected) {
3328
+ innerFail({
3329
+ actual,
3330
+ expected,
3331
+ message,
3332
+ operator: "!=",
3333
+ stackStartFn: notEqual
3334
+ });
3335
+ }
3336
+ };
3337
+ assert5.deepEqual = function deepEqual(actual, expected, message) {
3338
+ if (arguments.length < 2) {
3339
+ throw new ERR_MISSING_ARGS("actual", "expected");
3340
+ }
3341
+ if (isDeepEqual === void 0)
3342
+ lazyLoadComparison();
3343
+ if (!isDeepEqual(actual, expected)) {
3344
+ innerFail({
3345
+ actual,
3346
+ expected,
3347
+ message,
3348
+ operator: "deepEqual",
3349
+ stackStartFn: deepEqual
3350
+ });
3351
+ }
3352
+ };
3353
+ assert5.notDeepEqual = function notDeepEqual(actual, expected, message) {
3354
+ if (arguments.length < 2) {
3355
+ throw new ERR_MISSING_ARGS("actual", "expected");
3356
+ }
3357
+ if (isDeepEqual === void 0)
3358
+ lazyLoadComparison();
3359
+ if (isDeepEqual(actual, expected)) {
3360
+ innerFail({
3361
+ actual,
3362
+ expected,
3363
+ message,
3364
+ operator: "notDeepEqual",
3365
+ stackStartFn: notDeepEqual
3366
+ });
3367
+ }
3368
+ };
3369
+ assert5.deepStrictEqual = function deepStrictEqual(actual, expected, message) {
3370
+ if (arguments.length < 2) {
3371
+ throw new ERR_MISSING_ARGS("actual", "expected");
3372
+ }
3373
+ if (isDeepEqual === void 0)
3374
+ lazyLoadComparison();
3375
+ if (!isDeepStrictEqual(actual, expected)) {
3376
+ innerFail({
3377
+ actual,
3378
+ expected,
3379
+ message,
3380
+ operator: "deepStrictEqual",
3381
+ stackStartFn: deepStrictEqual
3382
+ });
3383
+ }
3384
+ };
3385
+ assert5.notDeepStrictEqual = notDeepStrictEqual;
3386
+ function notDeepStrictEqual(actual, expected, message) {
3387
+ if (arguments.length < 2) {
3388
+ throw new ERR_MISSING_ARGS("actual", "expected");
3389
+ }
3390
+ if (isDeepEqual === void 0)
3391
+ lazyLoadComparison();
3392
+ if (isDeepStrictEqual(actual, expected)) {
3393
+ innerFail({
3394
+ actual,
3395
+ expected,
3396
+ message,
3397
+ operator: "notDeepStrictEqual",
3398
+ stackStartFn: notDeepStrictEqual
3399
+ });
3400
+ }
3401
+ }
3402
+ assert5.strictEqual = function strictEqual(actual, expected, message) {
3403
+ if (arguments.length < 2) {
3404
+ throw new ERR_MISSING_ARGS("actual", "expected");
3405
+ }
3406
+ if (!objectIs(actual, expected)) {
3407
+ innerFail({
3408
+ actual,
3409
+ expected,
3410
+ message,
3411
+ operator: "strictEqual",
3412
+ stackStartFn: strictEqual
3413
+ });
3414
+ }
3415
+ };
3416
+ assert5.notStrictEqual = function notStrictEqual(actual, expected, message) {
3417
+ if (arguments.length < 2) {
3418
+ throw new ERR_MISSING_ARGS("actual", "expected");
3419
+ }
3420
+ if (objectIs(actual, expected)) {
3421
+ innerFail({
3422
+ actual,
3423
+ expected,
3424
+ message,
3425
+ operator: "notStrictEqual",
3426
+ stackStartFn: notStrictEqual
3427
+ });
3428
+ }
3429
+ };
3430
+ var Comparison = function Comparison2(obj, keys, actual) {
3431
+ var _this = this;
3432
+ _classCallCheck(this, Comparison2);
3433
+ keys.forEach(function(key) {
3434
+ if (key in obj) {
3435
+ if (actual !== void 0 && typeof actual[key] === "string" && isRegExp(obj[key]) && obj[key].test(actual[key])) {
3436
+ _this[key] = actual[key];
3437
+ } else {
3438
+ _this[key] = obj[key];
3439
+ }
3440
+ }
3441
+ });
3442
+ };
3443
+ function compareExceptionKey(actual, expected, key, message, keys, fn) {
3444
+ if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {
3445
+ if (!message) {
3446
+ var a = new Comparison(actual, keys);
3447
+ var b = new Comparison(expected, keys, actual);
3448
+ var err = new AssertionError({
3449
+ actual: a,
3450
+ expected: b,
3451
+ operator: "deepStrictEqual",
3452
+ stackStartFn: fn
3453
+ });
3454
+ err.actual = actual;
3455
+ err.expected = expected;
3456
+ err.operator = fn.name;
3457
+ throw err;
3458
+ }
3459
+ innerFail({
3460
+ actual,
3461
+ expected,
3462
+ message,
3463
+ operator: fn.name,
3464
+ stackStartFn: fn
3465
+ });
3466
+ }
3467
+ }
3468
+ function expectedException(actual, expected, msg, fn) {
3469
+ if (typeof expected !== "function") {
3470
+ if (isRegExp(expected))
3471
+ return expected.test(actual);
3472
+ if (arguments.length === 2) {
3473
+ throw new ERR_INVALID_ARG_TYPE("expected", ["Function", "RegExp"], expected);
3474
+ }
3475
+ if (_typeof(actual) !== "object" || actual === null) {
3476
+ var err = new AssertionError({
3477
+ actual,
3478
+ expected,
3479
+ message: msg,
3480
+ operator: "deepStrictEqual",
3481
+ stackStartFn: fn
3482
+ });
3483
+ err.operator = fn.name;
3484
+ throw err;
3485
+ }
3486
+ var keys = Object.keys(expected);
3487
+ if (expected instanceof Error) {
3488
+ keys.push("name", "message");
3489
+ } else if (keys.length === 0) {
3490
+ throw new ERR_INVALID_ARG_VALUE("error", expected, "may not be an empty object");
3491
+ }
3492
+ if (isDeepEqual === void 0)
3493
+ lazyLoadComparison();
3494
+ keys.forEach(function(key) {
3495
+ if (typeof actual[key] === "string" && isRegExp(expected[key]) && expected[key].test(actual[key])) {
3496
+ return;
3497
+ }
3498
+ compareExceptionKey(actual, expected, key, msg, keys, fn);
3499
+ });
3500
+ return true;
3501
+ }
3502
+ if (expected.prototype !== void 0 && actual instanceof expected) {
3503
+ return true;
3504
+ }
3505
+ if (Error.isPrototypeOf(expected)) {
3506
+ return false;
3507
+ }
3508
+ return expected.call({}, actual) === true;
3509
+ }
3510
+ function getActual(fn) {
3511
+ if (typeof fn !== "function") {
3512
+ throw new ERR_INVALID_ARG_TYPE("fn", "Function", fn);
3513
+ }
3514
+ try {
3515
+ fn();
3516
+ } catch (e) {
3517
+ return e;
3518
+ }
3519
+ return NO_EXCEPTION_SENTINEL;
3520
+ }
3521
+ function checkIsPromise(obj) {
3522
+ return isPromise(obj) || obj !== null && _typeof(obj) === "object" && typeof obj.then === "function" && typeof obj.catch === "function";
3523
+ }
3524
+ function waitForActual(promiseFn) {
3525
+ return Promise.resolve().then(function() {
3526
+ var resultPromise;
3527
+ if (typeof promiseFn === "function") {
3528
+ resultPromise = promiseFn();
3529
+ if (!checkIsPromise(resultPromise)) {
3530
+ throw new ERR_INVALID_RETURN_VALUE("instance of Promise", "promiseFn", resultPromise);
3531
+ }
3532
+ } else if (checkIsPromise(promiseFn)) {
3533
+ resultPromise = promiseFn;
3534
+ } else {
3535
+ throw new ERR_INVALID_ARG_TYPE("promiseFn", ["Function", "Promise"], promiseFn);
3536
+ }
3537
+ return Promise.resolve().then(function() {
3538
+ return resultPromise;
3539
+ }).then(function() {
3540
+ return NO_EXCEPTION_SENTINEL;
3541
+ }).catch(function(e) {
3542
+ return e;
3543
+ });
3544
+ });
3545
+ }
3546
+ function expectsError(stackStartFn, actual, error, message) {
3547
+ if (typeof error === "string") {
3548
+ if (arguments.length === 4) {
3549
+ throw new ERR_INVALID_ARG_TYPE("error", ["Object", "Error", "Function", "RegExp"], error);
3550
+ }
3551
+ if (_typeof(actual) === "object" && actual !== null) {
3552
+ if (actual.message === error) {
3553
+ throw new ERR_AMBIGUOUS_ARGUMENT("error/message", 'The error message "'.concat(actual.message, '" is identical to the message.'));
3554
+ }
3555
+ } else if (actual === error) {
3556
+ throw new ERR_AMBIGUOUS_ARGUMENT("error/message", 'The error "'.concat(actual, '" is identical to the message.'));
3557
+ }
3558
+ message = error;
3559
+ error = void 0;
3560
+ } else if (error != null && _typeof(error) !== "object" && typeof error !== "function") {
3561
+ throw new ERR_INVALID_ARG_TYPE("error", ["Object", "Error", "Function", "RegExp"], error);
3562
+ }
3563
+ if (actual === NO_EXCEPTION_SENTINEL) {
3564
+ var details = "";
3565
+ if (error && error.name) {
3566
+ details += " (".concat(error.name, ")");
3567
+ }
3568
+ details += message ? ": ".concat(message) : ".";
3569
+ var fnType = stackStartFn.name === "rejects" ? "rejection" : "exception";
3570
+ innerFail({
3571
+ actual: void 0,
3572
+ expected: error,
3573
+ operator: stackStartFn.name,
3574
+ message: "Missing expected ".concat(fnType).concat(details),
3575
+ stackStartFn
3576
+ });
3577
+ }
3578
+ if (error && !expectedException(actual, error, message, stackStartFn)) {
3579
+ throw actual;
3580
+ }
3581
+ }
3582
+ function expectsNoError(stackStartFn, actual, error, message) {
3583
+ if (actual === NO_EXCEPTION_SENTINEL)
3584
+ return;
3585
+ if (typeof error === "string") {
3586
+ message = error;
3587
+ error = void 0;
3588
+ }
3589
+ if (!error || expectedException(actual, error)) {
3590
+ var details = message ? ": ".concat(message) : ".";
3591
+ var fnType = stackStartFn.name === "doesNotReject" ? "rejection" : "exception";
3592
+ innerFail({
3593
+ actual,
3594
+ expected: error,
3595
+ operator: stackStartFn.name,
3596
+ message: "Got unwanted ".concat(fnType).concat(details, "\n") + 'Actual message: "'.concat(actual && actual.message, '"'),
3597
+ stackStartFn
3598
+ });
3599
+ }
3600
+ throw actual;
3601
+ }
3602
+ assert5.throws = function throws(promiseFn) {
3603
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
3604
+ args[_key2 - 1] = arguments[_key2];
3605
+ }
3606
+ expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));
3607
+ };
3608
+ assert5.rejects = function rejects(promiseFn) {
3609
+ for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
3610
+ args[_key3 - 1] = arguments[_key3];
3611
+ }
3612
+ return waitForActual(promiseFn).then(function(result) {
3613
+ return expectsError.apply(void 0, [rejects, result].concat(args));
3614
+ });
3615
+ };
3616
+ assert5.doesNotThrow = function doesNotThrow(fn) {
3617
+ for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
3618
+ args[_key4 - 1] = arguments[_key4];
3619
+ }
3620
+ expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));
3621
+ };
3622
+ assert5.doesNotReject = function doesNotReject(fn) {
3623
+ for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
3624
+ args[_key5 - 1] = arguments[_key5];
3625
+ }
3626
+ return waitForActual(fn).then(function(result) {
3627
+ return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));
3628
+ });
3629
+ };
3630
+ assert5.ifError = function ifError(err) {
3631
+ if (err !== null && err !== void 0) {
3632
+ var message = "ifError got unwanted exception: ";
3633
+ if (_typeof(err) === "object" && typeof err.message === "string") {
3634
+ if (err.message.length === 0 && err.constructor) {
3635
+ message += err.constructor.name;
3636
+ } else {
3637
+ message += err.message;
3638
+ }
3639
+ } else {
3640
+ message += inspect(err);
3641
+ }
3642
+ var newErr = new AssertionError({
3643
+ actual: err,
3644
+ expected: null,
3645
+ operator: "ifError",
3646
+ message,
3647
+ stackStartFn: ifError
3648
+ });
3649
+ var origStack = err.stack;
3650
+ if (typeof origStack === "string") {
3651
+ var tmp2 = origStack.split("\n");
3652
+ tmp2.shift();
3653
+ var tmp1 = newErr.stack.split("\n");
3654
+ for (var i = 0; i < tmp2.length; i++) {
3655
+ var pos = tmp1.indexOf(tmp2[i]);
3656
+ if (pos !== -1) {
3657
+ tmp1 = tmp1.slice(0, pos);
3658
+ break;
3659
+ }
3660
+ }
3661
+ newErr.stack = "".concat(tmp1.join("\n"), "\n").concat(tmp2.join("\n"));
3662
+ }
3663
+ throw newErr;
3664
+ }
3665
+ };
3666
+ function strict() {
3667
+ for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
3668
+ args[_key6] = arguments[_key6];
3669
+ }
3670
+ innerOk.apply(void 0, [strict, args.length].concat(args));
3671
+ }
3672
+ assert5.strict = objectAssign(strict, assert5, {
3673
+ equal: assert5.strictEqual,
3674
+ deepEqual: assert5.deepStrictEqual,
3675
+ notEqual: assert5.notStrictEqual,
3676
+ notDeepEqual: assert5.notDeepStrictEqual
3677
+ });
3678
+ assert5.strict.strict = assert5.strict;
3679
+ }
3680
+ });
3681
+
26
3682
  // ../../../common/temp/node_modules/.pnpm/@protobufjs+aspromise@1.1.2/node_modules/@protobufjs/aspromise/index.js
27
3683
  var require_aspromise = __commonJS({
28
3684
  "../../../common/temp/node_modules/.pnpm/@protobufjs+aspromise@1.1.2/node_modules/@protobufjs/aspromise/index.js"(exports2, module2) {
@@ -1305,20 +4961,20 @@ var require_roots = __commonJS({
1305
4961
  var require_index_minimal = __commonJS({
1306
4962
  "../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/index-minimal.js"(exports2) {
1307
4963
  "use strict";
1308
- var protobuf = exports2;
1309
- protobuf.build = "minimal";
1310
- protobuf.Writer = require_writer();
1311
- protobuf.BufferWriter = require_writer_buffer();
1312
- protobuf.Reader = require_reader();
1313
- protobuf.BufferReader = require_reader_buffer();
1314
- protobuf.util = require_minimal();
1315
- protobuf.rpc = require_rpc();
1316
- protobuf.roots = require_roots();
1317
- protobuf.configure = configure;
4964
+ var protobuf2 = exports2;
4965
+ protobuf2.build = "minimal";
4966
+ protobuf2.Writer = require_writer();
4967
+ protobuf2.BufferWriter = require_writer_buffer();
4968
+ protobuf2.Reader = require_reader();
4969
+ protobuf2.BufferReader = require_reader_buffer();
4970
+ protobuf2.util = require_minimal();
4971
+ protobuf2.rpc = require_rpc();
4972
+ protobuf2.roots = require_roots();
4973
+ protobuf2.configure = configure;
1318
4974
  function configure() {
1319
- protobuf.util._configure();
1320
- protobuf.Writer._configure(protobuf.BufferWriter);
1321
- protobuf.Reader._configure(protobuf.BufferReader);
4975
+ protobuf2.util._configure();
4976
+ protobuf2.Writer._configure(protobuf2.BufferWriter);
4977
+ protobuf2.Reader._configure(protobuf2.BufferReader);
1322
4978
  }
1323
4979
  configure();
1324
4980
  }
@@ -1478,11 +5134,11 @@ var require_path = __commonJS({
1478
5134
  });
1479
5135
 
1480
5136
  // ../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/types.js
1481
- var require_types = __commonJS({
5137
+ var require_types2 = __commonJS({
1482
5138
  "../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/types.js"(exports2) {
1483
5139
  "use strict";
1484
5140
  var types = exports2;
1485
- var util = require_util();
5141
+ var util = require_util2();
1486
5142
  var s = [
1487
5143
  "double",
1488
5144
  "float",
@@ -1588,9 +5244,9 @@ var require_field = __commonJS({
1588
5244
  module2.exports = Field;
1589
5245
  var ReflectionObject = require_object();
1590
5246
  ((Field.prototype = Object.create(ReflectionObject.prototype)).constructor = Field).className = "Field";
1591
- var Enum2 = require_enum();
1592
- var types = require_types();
1593
- var util = require_util();
5247
+ var Enum3 = require_enum();
5248
+ var types = require_types2();
5249
+ var util = require_util2();
1594
5250
  var Type3;
1595
5251
  var ruleRe = /^required|optional|repeated$/;
1596
5252
  Field.fromJSON = function fromJSON(name, json) {
@@ -1679,11 +5335,11 @@ var require_field = __commonJS({
1679
5335
  }
1680
5336
  if (this.options && this.options["default"] != null) {
1681
5337
  this.typeDefault = this.options["default"];
1682
- if (this.resolvedType instanceof Enum2 && typeof this.typeDefault === "string")
5338
+ if (this.resolvedType instanceof Enum3 && typeof this.typeDefault === "string")
1683
5339
  this.typeDefault = this.resolvedType.values[this.typeDefault];
1684
5340
  }
1685
5341
  if (this.options) {
1686
- if (this.options.packed === true || this.options.packed !== void 0 && this.resolvedType && !(this.resolvedType instanceof Enum2))
5342
+ if (this.options.packed === true || this.options.packed !== void 0 && this.resolvedType && !(this.resolvedType instanceof Enum3))
1687
5343
  delete this.options.packed;
1688
5344
  if (!Object.keys(this.options).length)
1689
5345
  this.options = void 0;
@@ -1733,7 +5389,7 @@ var require_oneof = __commonJS({
1733
5389
  var ReflectionObject = require_object();
1734
5390
  ((OneOf.prototype = Object.create(ReflectionObject.prototype)).constructor = OneOf).className = "OneOf";
1735
5391
  var Field = require_field();
1736
- var util = require_util();
5392
+ var util = require_util2();
1737
5393
  function OneOf(name, fieldNames, options, comment) {
1738
5394
  if (!Array.isArray(fieldNames)) {
1739
5395
  options = fieldNames;
@@ -1833,10 +5489,10 @@ var require_namespace = __commonJS({
1833
5489
  ((Namespace.prototype = Object.create(ReflectionObject.prototype)).constructor = Namespace).className = "Namespace";
1834
5490
  var Field = require_field();
1835
5491
  var OneOf = require_oneof();
1836
- var util = require_util();
5492
+ var util = require_util2();
1837
5493
  var Type3;
1838
5494
  var Service2;
1839
- var Enum2;
5495
+ var Enum3;
1840
5496
  Namespace.fromJSON = function fromJSON(name, json) {
1841
5497
  return new Namespace(name, json.options).addJSON(json.nested);
1842
5498
  };
@@ -1892,7 +5548,7 @@ var require_namespace = __commonJS({
1892
5548
  if (nestedJson) {
1893
5549
  for (var names = Object.keys(nestedJson), i = 0, nested; i < names.length; ++i) {
1894
5550
  nested = nestedJson[names[i]];
1895
- ns.add((nested.fields !== void 0 ? Type3.fromJSON : nested.values !== void 0 ? Enum2.fromJSON : nested.methods !== void 0 ? Service2.fromJSON : nested.id !== void 0 ? Field.fromJSON : Namespace.fromJSON)(names[i], nested));
5551
+ ns.add((nested.fields !== void 0 ? Type3.fromJSON : nested.values !== void 0 ? Enum3.fromJSON : nested.methods !== void 0 ? Service2.fromJSON : nested.id !== void 0 ? Field.fromJSON : Namespace.fromJSON)(names[i], nested));
1896
5552
  }
1897
5553
  }
1898
5554
  return this;
@@ -1901,12 +5557,12 @@ var require_namespace = __commonJS({
1901
5557
  return this.nested && this.nested[name] || null;
1902
5558
  };
1903
5559
  Namespace.prototype.getEnum = function getEnum(name) {
1904
- if (this.nested && this.nested[name] instanceof Enum2)
5560
+ if (this.nested && this.nested[name] instanceof Enum3)
1905
5561
  return this.nested[name].values;
1906
5562
  throw Error("no such enum: " + name);
1907
5563
  };
1908
5564
  Namespace.prototype.add = function add(object) {
1909
- if (!(object instanceof Field && object.extend !== void 0 || object instanceof Type3 || object instanceof Enum2 || object instanceof Service2 || object instanceof Namespace || object instanceof OneOf))
5565
+ if (!(object instanceof Field && object.extend !== void 0 || object instanceof Type3 || object instanceof Enum3 || object instanceof Service2 || object instanceof Namespace || object instanceof OneOf))
1910
5566
  throw TypeError("object must be a valid nested object");
1911
5567
  if (!this.nested)
1912
5568
  this.nested = {};
@@ -2006,13 +5662,13 @@ var require_namespace = __commonJS({
2006
5662
  return found;
2007
5663
  };
2008
5664
  Namespace.prototype.lookupEnum = function lookupEnum(path) {
2009
- var found = this.lookup(path, [Enum2]);
5665
+ var found = this.lookup(path, [Enum3]);
2010
5666
  if (!found)
2011
5667
  throw Error("no such Enum '" + path + "' in " + this);
2012
5668
  return found;
2013
5669
  };
2014
5670
  Namespace.prototype.lookupTypeOrEnum = function lookupTypeOrEnum(path) {
2015
- var found = this.lookup(path, [Type3, Enum2]);
5671
+ var found = this.lookup(path, [Type3, Enum3]);
2016
5672
  if (!found)
2017
5673
  throw Error("no such Type or Enum '" + path + "' in " + this);
2018
5674
  return found;
@@ -2026,7 +5682,7 @@ var require_namespace = __commonJS({
2026
5682
  Namespace._configure = function(Type_, Service_, Enum_) {
2027
5683
  Type3 = Type_;
2028
5684
  Service2 = Service_;
2029
- Enum2 = Enum_;
5685
+ Enum3 = Enum_;
2030
5686
  };
2031
5687
  }
2032
5688
  });
@@ -2038,8 +5694,8 @@ var require_mapfield = __commonJS({
2038
5694
  module2.exports = MapField2;
2039
5695
  var Field = require_field();
2040
5696
  ((MapField2.prototype = Object.create(Field.prototype)).constructor = MapField2).className = "MapField";
2041
- var types = require_types();
2042
- var util = require_util();
5697
+ var types = require_types2();
5698
+ var util = require_util2();
2043
5699
  function MapField2(name, id, keyType, type, options, comment) {
2044
5700
  Field.call(this, name, id, type, void 0, void 0, options, comment);
2045
5701
  if (!util.isString(keyType))
@@ -2094,7 +5750,7 @@ var require_method = __commonJS({
2094
5750
  module2.exports = Method;
2095
5751
  var ReflectionObject = require_object();
2096
5752
  ((Method.prototype = Object.create(ReflectionObject.prototype)).constructor = Method).className = "Method";
2097
- var util = require_util();
5753
+ var util = require_util2();
2098
5754
  function Method(name, type, requestType, responseType, requestStream, responseStream, options, comment, parsedOptions) {
2099
5755
  if (util.isObject(requestStream)) {
2100
5756
  options = requestStream;
@@ -2162,7 +5818,7 @@ var require_service2 = __commonJS({
2162
5818
  var Namespace = require_namespace();
2163
5819
  ((Service2.prototype = Object.create(Namespace.prototype)).constructor = Service2).className = "Service";
2164
5820
  var Method = require_method();
2165
- var util = require_util();
5821
+ var util = require_util2();
2166
5822
  var rpc = require_rpc();
2167
5823
  function Service2(name, options) {
2168
5824
  Namespace.call(this, name, options);
@@ -2292,9 +5948,9 @@ var require_decoder = __commonJS({
2292
5948
  "../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/decoder.js"(exports2, module2) {
2293
5949
  "use strict";
2294
5950
  module2.exports = decoder;
2295
- var Enum2 = require_enum();
2296
- var types = require_types();
2297
- var util = require_util();
5951
+ var Enum3 = require_enum();
5952
+ var types = require_types2();
5953
+ var util = require_util2();
2298
5954
  function missing(field) {
2299
5955
  return "missing required '" + field.name + "'";
2300
5956
  }
@@ -2307,7 +5963,7 @@ var require_decoder = __commonJS({
2307
5963
  gen("switch(t>>>3){");
2308
5964
  var i = 0;
2309
5965
  for (; i < mtype.fieldsArray.length; ++i) {
2310
- var field = mtype._fieldsArray[i].resolve(), type = field.resolvedType instanceof Enum2 ? "int32" : field.type, ref2 = "m" + util.safeProp(field.name);
5966
+ var field = mtype._fieldsArray[i].resolve(), type = field.resolvedType instanceof Enum3 ? "int32" : field.type, ref2 = "m" + util.safeProp(field.name);
2311
5967
  gen("case %i:", field.id);
2312
5968
  if (field.map) {
2313
5969
  gen("if(%s===util.emptyObject)", ref2)("%s={}", ref2)("var c2 = r.uint32()+r.pos");
@@ -2359,14 +6015,14 @@ var require_verifier = __commonJS({
2359
6015
  "../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/verifier.js"(exports2, module2) {
2360
6016
  "use strict";
2361
6017
  module2.exports = verifier;
2362
- var Enum2 = require_enum();
2363
- var util = require_util();
6018
+ var Enum3 = require_enum();
6019
+ var util = require_util2();
2364
6020
  function invalid(field, expected) {
2365
6021
  return field.name + ": " + expected + (field.repeated && expected !== "array" ? "[]" : field.map && expected !== "object" ? "{k:" + field.keyType + "}" : "") + " expected";
2366
6022
  }
2367
6023
  function genVerifyValue(gen, field, fieldIndex, ref2) {
2368
6024
  if (field.resolvedType) {
2369
- if (field.resolvedType instanceof Enum2) {
6025
+ if (field.resolvedType instanceof Enum3) {
2370
6026
  gen("switch(%s){", ref2)("default:")("return%j", invalid(field, "enum value"));
2371
6027
  for (var keys = Object.keys(field.resolvedType.values), j = 0; j < keys.length; ++j)
2372
6028
  gen("case %i:", field.resolvedType.values[keys[j]]);
@@ -2468,11 +6124,11 @@ var require_converter = __commonJS({
2468
6124
  "../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/converter.js"(exports2) {
2469
6125
  "use strict";
2470
6126
  var converter = exports2;
2471
- var Enum2 = require_enum();
2472
- var util = require_util();
6127
+ var Enum3 = require_enum();
6128
+ var util = require_util2();
2473
6129
  function genValuePartial_fromObject(gen, field, fieldIndex, prop) {
2474
6130
  if (field.resolvedType) {
2475
- if (field.resolvedType instanceof Enum2) {
6131
+ if (field.resolvedType instanceof Enum3) {
2476
6132
  gen("switch(d%s){", prop);
2477
6133
  for (var values = field.resolvedType.values, keys = Object.keys(values), i = 0; i < keys.length; ++i) {
2478
6134
  if (field.repeated && values[keys[i]] === field.typeDefault)
@@ -2534,10 +6190,10 @@ var require_converter = __commonJS({
2534
6190
  gen("if(d%s){", prop)("if(!Array.isArray(d%s))", prop)("throw TypeError(%j)", field.fullName + ": array expected")("m%s=[]", prop)("for(var i=0;i<d%s.length;++i){", prop);
2535
6191
  genValuePartial_fromObject(gen, field, i, prop + "[i]")("}")("}");
2536
6192
  } else {
2537
- if (!(field.resolvedType instanceof Enum2))
6193
+ if (!(field.resolvedType instanceof Enum3))
2538
6194
  gen("if(d%s!=null){", prop);
2539
6195
  genValuePartial_fromObject(gen, field, i, prop);
2540
- if (!(field.resolvedType instanceof Enum2))
6196
+ if (!(field.resolvedType instanceof Enum3))
2541
6197
  gen("}");
2542
6198
  }
2543
6199
  }
@@ -2545,7 +6201,7 @@ var require_converter = __commonJS({
2545
6201
  };
2546
6202
  function genValuePartial_toObject(gen, field, fieldIndex, prop) {
2547
6203
  if (field.resolvedType) {
2548
- if (field.resolvedType instanceof Enum2)
6204
+ if (field.resolvedType instanceof Enum3)
2549
6205
  gen("d%s=o.enums===String?types[%i].values[m%s]:m%s", prop, fieldIndex, prop, prop);
2550
6206
  else
2551
6207
  gen("d%s=types[%i].toObject(m%s,o)", prop, fieldIndex, prop);
@@ -2599,7 +6255,7 @@ var require_converter = __commonJS({
2599
6255
  gen("if(o.defaults){");
2600
6256
  for (i = 0; i < normalFields.length; ++i) {
2601
6257
  var field = normalFields[i], prop = util.safeProp(field.name);
2602
- if (field.resolvedType instanceof Enum2)
6258
+ if (field.resolvedType instanceof Enum3)
2603
6259
  gen("d%s=o.enums===String?%j:%j", prop, field.resolvedType.valuesById[field.typeDefault], field.typeDefault);
2604
6260
  else if (field.long)
2605
6261
  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():n", prop)("}else")("d%s=o.longs===String?%j:%i", prop, field.typeDefault.toString(), field.typeDefault.toNumber());
@@ -2695,7 +6351,7 @@ var require_type = __commonJS({
2695
6351
  module2.exports = Type3;
2696
6352
  var Namespace = require_namespace();
2697
6353
  ((Type3.prototype = Object.create(Namespace.prototype)).constructor = Type3).className = "Type";
2698
- var Enum2 = require_enum();
6354
+ var Enum3 = require_enum();
2699
6355
  var OneOf = require_oneof();
2700
6356
  var Field = require_field();
2701
6357
  var MapField2 = require_mapfield();
@@ -2703,7 +6359,7 @@ var require_type = __commonJS({
2703
6359
  var Message = require_message();
2704
6360
  var Reader = require_reader();
2705
6361
  var Writer = require_writer();
2706
- var util = require_util();
6362
+ var util = require_util2();
2707
6363
  var encoder = require_encoder();
2708
6364
  var decoder = require_decoder();
2709
6365
  var verifier = require_verifier();
@@ -2802,7 +6458,7 @@ var require_type = __commonJS({
2802
6458
  if (json.nested)
2803
6459
  for (names = Object.keys(json.nested), i = 0; i < names.length; ++i) {
2804
6460
  var nested = json.nested[names[i]];
2805
- type.add((nested.id !== void 0 ? Field.fromJSON : nested.fields !== void 0 ? Type3.fromJSON : nested.values !== void 0 ? Enum2.fromJSON : nested.methods !== void 0 ? Service2.fromJSON : Namespace.fromJSON)(names[i], nested));
6461
+ type.add((nested.id !== void 0 ? Field.fromJSON : nested.fields !== void 0 ? Type3.fromJSON : nested.values !== void 0 ? Enum3.fromJSON : nested.methods !== void 0 ? Service2.fromJSON : Namespace.fromJSON)(names[i], nested));
2806
6462
  }
2807
6463
  if (json.extensions && json.extensions.length)
2808
6464
  type.extensions = json.extensions;
@@ -2976,33 +6632,33 @@ var require_type = __commonJS({
2976
6632
  var require_root = __commonJS({
2977
6633
  "../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/root.js"(exports2, module2) {
2978
6634
  "use strict";
2979
- module2.exports = Root2;
6635
+ module2.exports = Root3;
2980
6636
  var Namespace = require_namespace();
2981
- ((Root2.prototype = Object.create(Namespace.prototype)).constructor = Root2).className = "Root";
6637
+ ((Root3.prototype = Object.create(Namespace.prototype)).constructor = Root3).className = "Root";
2982
6638
  var Field = require_field();
2983
- var Enum2 = require_enum();
6639
+ var Enum3 = require_enum();
2984
6640
  var OneOf = require_oneof();
2985
- var util = require_util();
6641
+ var util = require_util2();
2986
6642
  var Type3;
2987
6643
  var parse;
2988
6644
  var common;
2989
- function Root2(options) {
6645
+ function Root3(options) {
2990
6646
  Namespace.call(this, "", options);
2991
6647
  this.deferred = [];
2992
6648
  this.files = [];
2993
6649
  }
2994
- Root2.fromJSON = function fromJSON(json, root) {
6650
+ Root3.fromJSON = function fromJSON(json, root) {
2995
6651
  if (!root)
2996
- root = new Root2();
6652
+ root = new Root3();
2997
6653
  if (json.options)
2998
6654
  root.setOptions(json.options);
2999
6655
  return root.addJSON(json.nested);
3000
6656
  };
3001
- Root2.prototype.resolvePath = util.path.resolve;
3002
- Root2.prototype.fetch = util.fetch;
6657
+ Root3.prototype.resolvePath = util.path.resolve;
6658
+ Root3.prototype.fetch = util.fetch;
3003
6659
  function SYNC() {
3004
6660
  }
3005
- Root2.prototype.load = function load(filename, options, callback) {
6661
+ Root3.prototype.load = function load(filename, options, callback) {
3006
6662
  if (typeof options === "function") {
3007
6663
  callback = options;
3008
6664
  options = void 0;
@@ -3029,7 +6685,7 @@ var require_root = __commonJS({
3029
6685
  }
3030
6686
  return null;
3031
6687
  }
3032
- function process(filename2, source) {
6688
+ function process2(filename2, source) {
3033
6689
  try {
3034
6690
  if (util.isString(source) && source.charAt(0) === "{")
3035
6691
  source = JSON.parse(source);
@@ -3061,12 +6717,12 @@ var require_root = __commonJS({
3061
6717
  self2.files.push(filename2);
3062
6718
  if (filename2 in common) {
3063
6719
  if (sync)
3064
- process(filename2, common[filename2]);
6720
+ process2(filename2, common[filename2]);
3065
6721
  else {
3066
6722
  ++queued;
3067
6723
  setTimeout(function() {
3068
6724
  --queued;
3069
- process(filename2, common[filename2]);
6725
+ process2(filename2, common[filename2]);
3070
6726
  });
3071
6727
  }
3072
6728
  return;
@@ -3080,7 +6736,7 @@ var require_root = __commonJS({
3080
6736
  finish(err);
3081
6737
  return;
3082
6738
  }
3083
- process(filename2, source);
6739
+ process2(filename2, source);
3084
6740
  } else {
3085
6741
  ++queued;
3086
6742
  self2.fetch(filename2, function(err, source2) {
@@ -3094,7 +6750,7 @@ var require_root = __commonJS({
3094
6750
  finish(null, self2);
3095
6751
  return;
3096
6752
  }
3097
- process(filename2, source2);
6753
+ process2(filename2, source2);
3098
6754
  });
3099
6755
  }
3100
6756
  }
@@ -3110,12 +6766,12 @@ var require_root = __commonJS({
3110
6766
  finish(null, self2);
3111
6767
  return void 0;
3112
6768
  };
3113
- Root2.prototype.loadSync = function loadSync(filename, options) {
6769
+ Root3.prototype.loadSync = function loadSync(filename, options) {
3114
6770
  if (!util.isNode)
3115
6771
  throw Error("not supported");
3116
6772
  return this.load(filename, options, SYNC);
3117
6773
  };
3118
- Root2.prototype.resolveAll = function resolveAll() {
6774
+ Root3.prototype.resolveAll = function resolveAll() {
3119
6775
  if (this.deferred.length)
3120
6776
  throw Error("unresolvable extensions: " + this.deferred.map(function(field) {
3121
6777
  return "'extend " + field.extend + "' in " + field.parent.fullName;
@@ -3134,13 +6790,13 @@ var require_root = __commonJS({
3134
6790
  }
3135
6791
  return false;
3136
6792
  }
3137
- Root2.prototype._handleAdd = function _handleAdd(object) {
6793
+ Root3.prototype._handleAdd = function _handleAdd(object) {
3138
6794
  if (object instanceof Field) {
3139
6795
  if (object.extend !== void 0 && !object.extensionField) {
3140
6796
  if (!tryHandleExtension(this, object))
3141
6797
  this.deferred.push(object);
3142
6798
  }
3143
- } else if (object instanceof Enum2) {
6799
+ } else if (object instanceof Enum3) {
3144
6800
  if (exposeRe.test(object.name))
3145
6801
  object.parent[object.name] = object.values;
3146
6802
  } else if (!(object instanceof OneOf)) {
@@ -3156,7 +6812,7 @@ var require_root = __commonJS({
3156
6812
  object.parent[object.name] = object;
3157
6813
  }
3158
6814
  };
3159
- Root2.prototype._handleRemove = function _handleRemove(object) {
6815
+ Root3.prototype._handleRemove = function _handleRemove(object) {
3160
6816
  if (object instanceof Field) {
3161
6817
  if (object.extend !== void 0) {
3162
6818
  if (object.extensionField) {
@@ -3168,7 +6824,7 @@ var require_root = __commonJS({
3168
6824
  this.deferred.splice(index, 1);
3169
6825
  }
3170
6826
  }
3171
- } else if (object instanceof Enum2) {
6827
+ } else if (object instanceof Enum3) {
3172
6828
  if (exposeRe.test(object.name))
3173
6829
  delete object.parent[object.name];
3174
6830
  } else if (object instanceof Namespace) {
@@ -3178,7 +6834,7 @@ var require_root = __commonJS({
3178
6834
  delete object.parent[object.name];
3179
6835
  }
3180
6836
  };
3181
- Root2._configure = function(Type_, parse_, common_) {
6837
+ Root3._configure = function(Type_, parse_, common_) {
3182
6838
  Type3 = Type_;
3183
6839
  parse = parse_;
3184
6840
  common = common_;
@@ -3187,13 +6843,13 @@ var require_root = __commonJS({
3187
6843
  });
3188
6844
 
3189
6845
  // ../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/util.js
3190
- var require_util = __commonJS({
6846
+ var require_util2 = __commonJS({
3191
6847
  "../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/util.js"(exports2, module2) {
3192
6848
  "use strict";
3193
6849
  var util = module2.exports = require_minimal();
3194
6850
  var roots = require_roots();
3195
6851
  var Type3;
3196
- var Enum2;
6852
+ var Enum3;
3197
6853
  util.codegen = require_codegen();
3198
6854
  util.fetch = require_fetch();
3199
6855
  util.path = require_path();
@@ -3260,9 +6916,9 @@ var require_util = __commonJS({
3260
6916
  util.decorateEnum = function decorateEnum(object) {
3261
6917
  if (object.$type)
3262
6918
  return object.$type;
3263
- if (!Enum2)
3264
- Enum2 = require_enum();
3265
- var enm = new Enum2("Enum" + decorateEnumIndex++, object);
6919
+ if (!Enum3)
6920
+ Enum3 = require_enum();
6921
+ var enm = new Enum3("Enum" + decorateEnumIndex++, object);
3266
6922
  util.decorateRoot.add(enm);
3267
6923
  Object.defineProperty(object, "$type", { value: enm, enumerable: false });
3268
6924
  return enm;
@@ -3301,8 +6957,8 @@ var require_object = __commonJS({
3301
6957
  "use strict";
3302
6958
  module2.exports = ReflectionObject;
3303
6959
  ReflectionObject.className = "ReflectionObject";
3304
- var util = require_util();
3305
- var Root2;
6960
+ var util = require_util2();
6961
+ var Root3;
3306
6962
  function ReflectionObject(name, options) {
3307
6963
  if (!util.isString(name))
3308
6964
  throw TypeError("name must be a string");
@@ -3345,12 +7001,12 @@ var require_object = __commonJS({
3345
7001
  this.parent = parent;
3346
7002
  this.resolved = false;
3347
7003
  var root = parent.root;
3348
- if (root instanceof Root2)
7004
+ if (root instanceof Root3)
3349
7005
  root._handleAdd(this);
3350
7006
  };
3351
7007
  ReflectionObject.prototype.onRemove = function onRemove(parent) {
3352
7008
  var root = parent.root;
3353
- if (root instanceof Root2)
7009
+ if (root instanceof Root3)
3354
7010
  root._handleRemove(this);
3355
7011
  this.parent = null;
3356
7012
  this.resolved = false;
@@ -3358,7 +7014,7 @@ var require_object = __commonJS({
3358
7014
  ReflectionObject.prototype.resolve = function resolve() {
3359
7015
  if (this.resolved)
3360
7016
  return this;
3361
- if (this.root instanceof Root2)
7017
+ if (this.root instanceof Root3)
3362
7018
  this.resolved = true;
3363
7019
  return this;
3364
7020
  };
@@ -3409,7 +7065,7 @@ var require_object = __commonJS({
3409
7065
  return className;
3410
7066
  };
3411
7067
  ReflectionObject._configure = function(Root_) {
3412
- Root2 = Root_;
7068
+ Root3 = Root_;
3413
7069
  };
3414
7070
  }
3415
7071
  });
@@ -3418,12 +7074,12 @@ var require_object = __commonJS({
3418
7074
  var require_enum = __commonJS({
3419
7075
  "../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/enum.js"(exports2, module2) {
3420
7076
  "use strict";
3421
- module2.exports = Enum2;
7077
+ module2.exports = Enum3;
3422
7078
  var ReflectionObject = require_object();
3423
- ((Enum2.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum2).className = "Enum";
7079
+ ((Enum3.prototype = Object.create(ReflectionObject.prototype)).constructor = Enum3).className = "Enum";
3424
7080
  var Namespace = require_namespace();
3425
- var util = require_util();
3426
- function Enum2(name, values, options, comment, comments) {
7081
+ var util = require_util2();
7082
+ function Enum3(name, values, options, comment, comments) {
3427
7083
  ReflectionObject.call(this, name, options);
3428
7084
  if (values && typeof values !== "object")
3429
7085
  throw TypeError("values must be an object");
@@ -3438,12 +7094,12 @@ var require_enum = __commonJS({
3438
7094
  this.valuesById[this.values[keys[i]] = values[keys[i]]] = keys[i];
3439
7095
  }
3440
7096
  }
3441
- Enum2.fromJSON = function fromJSON(name, json) {
3442
- var enm = new Enum2(name, json.values, json.options, json.comment, json.comments);
7097
+ Enum3.fromJSON = function fromJSON(name, json) {
7098
+ var enm = new Enum3(name, json.values, json.options, json.comment, json.comments);
3443
7099
  enm.reserved = json.reserved;
3444
7100
  return enm;
3445
7101
  };
3446
- Enum2.prototype.toJSON = function toJSON(toJSONOptions) {
7102
+ Enum3.prototype.toJSON = function toJSON(toJSONOptions) {
3447
7103
  var keepComments = toJSONOptions ? Boolean(toJSONOptions.keepComments) : false;
3448
7104
  return util.toObject([
3449
7105
  "options",
@@ -3458,7 +7114,7 @@ var require_enum = __commonJS({
3458
7114
  keepComments ? this.comments : void 0
3459
7115
  ]);
3460
7116
  };
3461
- Enum2.prototype.add = function add(name, id, comment) {
7117
+ Enum3.prototype.add = function add(name, id, comment) {
3462
7118
  if (!util.isString(name))
3463
7119
  throw TypeError("name must be a string");
3464
7120
  if (!util.isInteger(id))
@@ -3478,7 +7134,7 @@ var require_enum = __commonJS({
3478
7134
  this.comments[name] = comment || null;
3479
7135
  return this;
3480
7136
  };
3481
- Enum2.prototype.remove = function remove(name) {
7137
+ Enum3.prototype.remove = function remove(name) {
3482
7138
  if (!util.isString(name))
3483
7139
  throw TypeError("name must be a string");
3484
7140
  var val = this.values[name];
@@ -3489,10 +7145,10 @@ var require_enum = __commonJS({
3489
7145
  delete this.comments[name];
3490
7146
  return this;
3491
7147
  };
3492
- Enum2.prototype.isReservedId = function isReservedId(id) {
7148
+ Enum3.prototype.isReservedId = function isReservedId(id) {
3493
7149
  return Namespace.isReservedId(this.reserved, id);
3494
7150
  };
3495
- Enum2.prototype.isReservedName = function isReservedName(name) {
7151
+ Enum3.prototype.isReservedName = function isReservedName(name) {
3496
7152
  return Namespace.isReservedName(this.reserved, name);
3497
7153
  };
3498
7154
  }
@@ -3503,9 +7159,9 @@ var require_encoder = __commonJS({
3503
7159
  "../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/encoder.js"(exports2, module2) {
3504
7160
  "use strict";
3505
7161
  module2.exports = encoder;
3506
- var Enum2 = require_enum();
3507
- var types = require_types();
3508
- var util = require_util();
7162
+ var Enum3 = require_enum();
7163
+ var types = require_types2();
7164
+ var util = require_util2();
3509
7165
  function genTypePartial(gen, field, fieldIndex, ref2) {
3510
7166
  return field.resolvedType.group ? gen("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", fieldIndex, ref2, (field.id << 3 | 3) >>> 0, (field.id << 3 | 4) >>> 0) : gen("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", fieldIndex, ref2, (field.id << 3 | 2) >>> 0);
3511
7167
  }
@@ -3514,7 +7170,7 @@ var require_encoder = __commonJS({
3514
7170
  var i, ref2;
3515
7171
  var fields = mtype.fieldsArray.slice().sort(util.compareFieldsById);
3516
7172
  for (var i = 0; i < fields.length; ++i) {
3517
- var field = fields[i].resolve(), index = mtype._fieldsArray.indexOf(field), type = field.resolvedType instanceof Enum2 ? "int32" : field.type, wireType = types.basic[type];
7173
+ var field = fields[i].resolve(), index = mtype._fieldsArray.indexOf(field), type = field.resolvedType instanceof Enum3 ? "int32" : field.type, wireType = types.basic[type];
3518
7174
  ref2 = "m" + util.safeProp(field.name);
3519
7175
  if (field.map) {
3520
7176
  gen("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", ref2, field.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", ref2)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (field.id << 3 | 2) >>> 0, 8 | types.mapKey[field.keyType], field.keyType);
@@ -3553,45 +7209,45 @@ var require_encoder = __commonJS({
3553
7209
  var require_index_light = __commonJS({
3554
7210
  "../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/index-light.js"(exports2, module2) {
3555
7211
  "use strict";
3556
- var protobuf = module2.exports = require_index_minimal();
3557
- protobuf.build = "light";
7212
+ var protobuf2 = module2.exports = require_index_minimal();
7213
+ protobuf2.build = "light";
3558
7214
  function load(filename, root, callback) {
3559
7215
  if (typeof root === "function") {
3560
7216
  callback = root;
3561
- root = new protobuf.Root();
7217
+ root = new protobuf2.Root();
3562
7218
  } else if (!root)
3563
- root = new protobuf.Root();
7219
+ root = new protobuf2.Root();
3564
7220
  return root.load(filename, callback);
3565
7221
  }
3566
- protobuf.load = load;
7222
+ protobuf2.load = load;
3567
7223
  function loadSync(filename, root) {
3568
7224
  if (!root)
3569
- root = new protobuf.Root();
7225
+ root = new protobuf2.Root();
3570
7226
  return root.loadSync(filename);
3571
7227
  }
3572
- protobuf.loadSync = loadSync;
3573
- protobuf.encoder = require_encoder();
3574
- protobuf.decoder = require_decoder();
3575
- protobuf.verifier = require_verifier();
3576
- protobuf.converter = require_converter();
3577
- protobuf.ReflectionObject = require_object();
3578
- protobuf.Namespace = require_namespace();
3579
- protobuf.Root = require_root();
3580
- protobuf.Enum = require_enum();
3581
- protobuf.Type = require_type();
3582
- protobuf.Field = require_field();
3583
- protobuf.OneOf = require_oneof();
3584
- protobuf.MapField = require_mapfield();
3585
- protobuf.Service = require_service2();
3586
- protobuf.Method = require_method();
3587
- protobuf.Message = require_message();
3588
- protobuf.wrappers = require_wrappers();
3589
- protobuf.types = require_types();
3590
- protobuf.util = require_util();
3591
- protobuf.ReflectionObject._configure(protobuf.Root);
3592
- protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);
3593
- protobuf.Root._configure(protobuf.Type);
3594
- protobuf.Field._configure(protobuf.Type);
7228
+ protobuf2.loadSync = loadSync;
7229
+ protobuf2.encoder = require_encoder();
7230
+ protobuf2.decoder = require_decoder();
7231
+ protobuf2.verifier = require_verifier();
7232
+ protobuf2.converter = require_converter();
7233
+ protobuf2.ReflectionObject = require_object();
7234
+ protobuf2.Namespace = require_namespace();
7235
+ protobuf2.Root = require_root();
7236
+ protobuf2.Enum = require_enum();
7237
+ protobuf2.Type = require_type();
7238
+ protobuf2.Field = require_field();
7239
+ protobuf2.OneOf = require_oneof();
7240
+ protobuf2.MapField = require_mapfield();
7241
+ protobuf2.Service = require_service2();
7242
+ protobuf2.Method = require_method();
7243
+ protobuf2.Message = require_message();
7244
+ protobuf2.wrappers = require_wrappers();
7245
+ protobuf2.types = require_types2();
7246
+ protobuf2.util = require_util2();
7247
+ protobuf2.ReflectionObject._configure(protobuf2.Root);
7248
+ protobuf2.Namespace._configure(protobuf2.Type, protobuf2.Service, protobuf2.Enum);
7249
+ protobuf2.Root._configure(protobuf2.Type);
7250
+ protobuf2.Field._configure(protobuf2.Type);
3595
7251
  }
3596
7252
  });
3597
7253
 
@@ -3836,16 +7492,16 @@ var require_parse = __commonJS({
3836
7492
  parse.filename = null;
3837
7493
  parse.defaults = { keepCase: false };
3838
7494
  var tokenize = require_tokenize();
3839
- var Root2 = require_root();
7495
+ var Root3 = require_root();
3840
7496
  var Type3 = require_type();
3841
7497
  var Field = require_field();
3842
7498
  var MapField2 = require_mapfield();
3843
7499
  var OneOf = require_oneof();
3844
- var Enum2 = require_enum();
7500
+ var Enum3 = require_enum();
3845
7501
  var Service2 = require_service2();
3846
7502
  var Method = require_method();
3847
- var types = require_types();
3848
- var util = require_util();
7503
+ var types = require_types2();
7504
+ var util = require_util2();
3849
7505
  var base10Re = /^[1-9][0-9]*$/;
3850
7506
  var base10NegRe = /^-?[1-9][0-9]*$/;
3851
7507
  var base16Re = /^0[x][0-9a-fA-F]+$/;
@@ -3857,9 +7513,9 @@ var require_parse = __commonJS({
3857
7513
  var typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/;
3858
7514
  var fqTypeRefRe = /^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;
3859
7515
  function parse(source, root, options) {
3860
- if (!(root instanceof Root2)) {
7516
+ if (!(root instanceof Root3)) {
3861
7517
  options = root;
3862
- root = new Root2();
7518
+ root = new Root3();
3863
7519
  }
3864
7520
  if (!options)
3865
7521
  options = parse.defaults;
@@ -4199,7 +7855,7 @@ var require_parse = __commonJS({
4199
7855
  function parseEnum(parent, token2) {
4200
7856
  if (!nameRe.test(token2 = next()))
4201
7857
  throw illegal(token2, "name");
4202
- var enm = new Enum2(token2);
7858
+ var enm = new Enum3(token2);
4203
7859
  ifBlock(enm, function parseEnum_block(token3) {
4204
7860
  switch (token3) {
4205
7861
  case "option":
@@ -4622,15 +8278,15 @@ var require_common = __commonJS({
4622
8278
  });
4623
8279
 
4624
8280
  // ../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/index.js
4625
- var require_src = __commonJS({
8281
+ var require_src2 = __commonJS({
4626
8282
  "../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/src/index.js"(exports2, module2) {
4627
8283
  "use strict";
4628
- var protobuf = module2.exports = require_index_light();
4629
- protobuf.build = "full";
4630
- protobuf.tokenize = require_tokenize();
4631
- protobuf.parse = require_parse();
4632
- protobuf.common = require_common();
4633
- protobuf.Root._configure(protobuf.Type, protobuf.parse, protobuf.common);
8284
+ var protobuf2 = module2.exports = require_index_light();
8285
+ protobuf2.build = "full";
8286
+ protobuf2.tokenize = require_tokenize();
8287
+ protobuf2.parse = require_parse();
8288
+ protobuf2.common = require_common();
8289
+ protobuf2.Root._configure(protobuf2.Type, protobuf2.parse, protobuf2.common);
4634
8290
  }
4635
8291
  });
4636
8292
 
@@ -4638,7 +8294,7 @@ var require_src = __commonJS({
4638
8294
  var require_protobufjs = __commonJS({
4639
8295
  "../../../common/temp/node_modules/.pnpm/protobufjs@6.11.2/node_modules/protobufjs/index.js"(exports2, module2) {
4640
8296
  "use strict";
4641
- module2.exports = require_src();
8297
+ module2.exports = require_src2();
4642
8298
  }
4643
8299
  });
4644
8300
 
@@ -4654,6 +8310,10 @@ __export(src_exports, {
4654
8310
  ServiceHandler: () => ServiceHandler,
4655
8311
  Stream: () => Stream,
4656
8312
  anySubstitutions: () => anySubstitutions,
8313
+ createMappingDescriptors: () => createMappingDescriptors,
8314
+ decodeProtobuf: () => decodeProtobuf,
8315
+ encodeProtobuf: () => encodeProtobuf,
8316
+ mapMessage: () => mapMessage,
4657
8317
  patchBufferCodec: () => patchBufferCodec,
4658
8318
  sanitize: () => sanitize,
4659
8319
  timestampSubstitutions: () => timestampSubstitutions
@@ -4667,7 +8327,7 @@ var patchBufferCodec = (codec) => ({
4667
8327
  });
4668
8328
 
4669
8329
  // src/precompiled-mapping/create-message-mapper.ts
4670
- var import_assert = __toESM(require("assert"));
8330
+ var import_node_assert = __toESM(require_assert());
4671
8331
  var pb = __toESM(require_protobufjs());
4672
8332
 
4673
8333
  // src/precompiled-mapping/codegen.ts
@@ -4707,10 +8367,10 @@ var createMessageMapperCached = (type, substitutions, cache) => {
4707
8367
  cache[type.fullName].map = codegen(`${type.name}$map`, ["obj", "extraArgs"], (c) => {
4708
8368
  c`const res = {};`;
4709
8369
  for (const field of type.fieldsArray) {
8370
+ field.resolve();
4710
8371
  c`if(obj.${field.name} !== undefined && obj.${field.name} !== null) {`;
4711
8372
  {
4712
8373
  const genMapScalar = (value) => {
4713
- field.resolve();
4714
8374
  const substitution = field.resolvedType && substitutions[field.resolvedType.fullName.slice(1)];
4715
8375
  if (substitution) {
4716
8376
  c`${ref(substitution)}(${value}, ...extraArgs)`;
@@ -4726,7 +8386,7 @@ var createMessageMapperCached = (type, substitutions, cache) => {
4726
8386
  genMapScalar("item");
4727
8387
  c`);`;
4728
8388
  } else if (field.map) {
4729
- (0, import_assert.default)(field instanceof pb.MapField);
8389
+ (0, import_node_assert.default)(field instanceof pb.MapField);
4730
8390
  c`res.${field.name} = {};`;
4731
8391
  c`for(const key of Object.keys(obj.${field.name})) {`;
4732
8392
  {
@@ -4742,12 +8402,52 @@ var createMessageMapperCached = (type, substitutions, cache) => {
4742
8402
  }
4743
8403
  }
4744
8404
  c`}`;
8405
+ if (!field.getOption("proto3_optional") && !field.repeated && !field.map && !field.partOf) {
8406
+ c`else {`;
8407
+ {
8408
+ if (field.resolvedType instanceof pb.Type) {
8409
+ const mapper = createMessageMapperCached(field.resolvedType, substitutions, cache);
8410
+ c`res.${field.name} = ${ref(mapper)}.map({}, extraArgs);`;
8411
+ } else if (field.resolvedType instanceof pb.Enum) {
8412
+ `res.${field.name} = 0;`;
8413
+ } else {
8414
+ c`res.${field.name} = ${getDefaultValue(field.type)};`;
8415
+ }
8416
+ }
8417
+ c`}`;
8418
+ }
4745
8419
  }
4746
8420
  c`return res;`;
4747
8421
  });
4748
8422
  }
4749
8423
  return cache[type.fullName];
4750
8424
  };
8425
+ var getDefaultValue = (type) => {
8426
+ switch (type) {
8427
+ case "double":
8428
+ case "float":
8429
+ case "int32":
8430
+ case "sfixed32":
8431
+ case "uint32":
8432
+ case "sint32":
8433
+ case "fixed32":
8434
+ return "0";
8435
+ case "sint64":
8436
+ case "int64":
8437
+ case "uint64":
8438
+ case "fixed64":
8439
+ case "sfixed64":
8440
+ return '"0"';
8441
+ case "bool":
8442
+ return "false";
8443
+ case "string":
8444
+ return '""';
8445
+ case "bytes":
8446
+ return "new Uint8Array()";
8447
+ default:
8448
+ throw new Error(`Unknown type: ${type}`);
8449
+ }
8450
+ };
4751
8451
 
4752
8452
  // src/codec.ts
4753
8453
  var OBJECT_CONVERSION_OPTIONS = {
@@ -4784,14 +8484,78 @@ var ProtoCodec = class {
4784
8484
  }
4785
8485
  };
4786
8486
 
8487
+ // src/encoding.ts
8488
+ var protobuf = __toESM(require_protobufjs());
8489
+ var encodeProtobuf = (root) => JSON.stringify(root.toJSON());
8490
+ var decodeProtobuf = (json) => protobuf.Root.fromJSON(JSON.parse(json));
8491
+
4787
8492
  // src/interface.ts
4788
8493
  var NOOP_CODEC = {
4789
8494
  encode: (value) => value,
4790
8495
  decode: (data) => data
4791
8496
  };
4792
8497
 
4793
- // src/sanitizer.ts
8498
+ // src/mapping.ts
8499
+ var import_node_assert2 = __toESM(require_assert());
4794
8500
  var import_protobufjs = __toESM(require_protobufjs());
8501
+ var createMappingDescriptors = (substitutions) => {
8502
+ const encode = {};
8503
+ const decode = {};
8504
+ for (const type of Object.keys(substitutions)) {
8505
+ encode[type] = substitutions[type].encode;
8506
+ decode[type] = substitutions[type].decode;
8507
+ }
8508
+ return {
8509
+ encode,
8510
+ decode
8511
+ };
8512
+ };
8513
+ var mapMessage = async (type, mapper, obj) => {
8514
+ const res = {};
8515
+ for (const field of type.fieldsArray) {
8516
+ if (!(field.name in obj)) {
8517
+ continue;
8518
+ }
8519
+ res[field.name] = await mapField(field, mapper, obj[field.name]);
8520
+ }
8521
+ return res;
8522
+ };
8523
+ var mapField = async (field, mapper, value) => {
8524
+ if (!field.required && (value === null || value === void 0)) {
8525
+ return value;
8526
+ } else if (field.repeated) {
8527
+ return await Promise.all(value.map((value2) => mapScalarField(field, mapper, value2)));
8528
+ } else if (field.map) {
8529
+ (0, import_node_assert2.default)(field instanceof import_protobufjs.default.MapField);
8530
+ return await asyncObjectMap((value2) => mapScalarField(field, mapper, value2), value);
8531
+ } else {
8532
+ return mapScalarField(field, mapper, value);
8533
+ }
8534
+ };
8535
+ var mapScalarField = async (field, mapper, value) => {
8536
+ var _a;
8537
+ if (!field.resolved) {
8538
+ field.resolve();
8539
+ }
8540
+ const typeName = (_a = field.resolvedType) == null ? void 0 : _a.fullName.slice(1);
8541
+ if (typeName) {
8542
+ return await mapper(value, typeName);
8543
+ }
8544
+ if (field.resolvedType && field.resolvedType instanceof import_protobufjs.default.Type) {
8545
+ return await mapMessage(field.resolvedType, mapper, value);
8546
+ }
8547
+ return value;
8548
+ };
8549
+ var asyncObjectMap = async (map, record) => {
8550
+ const res = {};
8551
+ await Promise.all(Object.entries(record).map(async ([key, value]) => {
8552
+ res[key] = await map(value, key);
8553
+ }));
8554
+ return res;
8555
+ };
8556
+
8557
+ // src/sanitizer.ts
8558
+ var import_protobufjs2 = __toESM(require_protobufjs());
4795
8559
  var sanitize = (type, value, path, context) => {
4796
8560
  for (const key of Object.keys(value)) {
4797
8561
  if (!type.fields[key]) {
@@ -4806,9 +8570,9 @@ var sanitize = (type, value, path, context) => {
4806
8570
  if (!field.resolvedType) {
4807
8571
  continue;
4808
8572
  }
4809
- if (field.resolvedType instanceof import_protobufjs.Type) {
8573
+ if (field.resolvedType instanceof import_protobufjs2.Type) {
4810
8574
  sanitize(field.resolvedType, value[key], `${path}.${key}`, context);
4811
- } else if (field.resolvedType instanceof import_protobufjs.Enum) {
8575
+ } else if (field.resolvedType instanceof import_protobufjs2.Enum) {
4812
8576
  value[key] = sanitizeEnum(field.resolvedType, value[key], `${path}.${key}`, context);
4813
8577
  }
4814
8578
  }
@@ -4831,39 +8595,33 @@ var sanitizeEnum = (type, value, path, context) => {
4831
8595
 
4832
8596
  // src/schema.ts
4833
8597
  var import_lodash = __toESM(require("lodash.merge"));
4834
- var import_protobufjs2 = __toESM(require_protobufjs());
4835
-
4836
- // src/mapping.ts
4837
- var createMappingDescriptors = (substitutions) => {
4838
- const encode = {};
4839
- const decode = {};
4840
- for (const type of Object.keys(substitutions)) {
4841
- encode[type] = substitutions[type].encode;
4842
- decode[type] = substitutions[type].decode;
4843
- }
4844
- return {
4845
- encode,
4846
- decode
4847
- };
4848
- };
8598
+ var import_protobufjs3 = __toESM(require_protobufjs());
4849
8599
 
4850
8600
  // src/service.ts
4851
- var import_assert3 = __toESM(require("assert"));
8601
+ var import_node_assert4 = __toESM(require_assert());
4852
8602
 
4853
8603
  // src/stream.ts
4854
- var import_assert2 = __toESM(require("assert"));
4855
8604
  var import_debug = __toESM(require("debug"));
8605
+ var import_node_assert3 = __toESM(require_assert());
4856
8606
  var log = (0, import_debug.default)("dxos:codec-protobuf:stream");
4857
8607
  var Stream = class {
4858
8608
  constructor(producer) {
4859
8609
  this._isClosed = false;
8610
+ this._isReady = false;
4860
8611
  this._buffer = [];
8612
+ this._readyPromise = new Promise((resolve) => {
8613
+ this._resolveReadyPromise = resolve;
8614
+ });
4861
8615
  const disposeCallback = producer({
8616
+ ready: () => {
8617
+ this._markAsReady();
8618
+ },
4862
8619
  next: (msg) => {
4863
8620
  if (this._isClosed) {
4864
8621
  log("Stream is closed, dropping message.");
4865
8622
  return;
4866
8623
  }
8624
+ this._markAsReady();
4867
8625
  if (this._messageHandler) {
4868
8626
  try {
4869
8627
  this._messageHandler(msg);
@@ -4871,7 +8629,7 @@ var Stream = class {
4871
8629
  throwUnhandledRejection(error);
4872
8630
  }
4873
8631
  } else {
4874
- (0, import_assert2.default)(this._buffer);
8632
+ (0, import_node_assert3.default)(this._buffer);
4875
8633
  this._buffer.push(msg);
4876
8634
  }
4877
8635
  },
@@ -4897,6 +8655,9 @@ var Stream = class {
4897
8655
  static consume(stream) {
4898
8656
  return new Promise((resolve) => {
4899
8657
  const items = [];
8658
+ stream.onReady(() => {
8659
+ items.push({ ready: true });
8660
+ });
4900
8661
  stream.subscribe((data) => {
4901
8662
  items.push({ data });
4902
8663
  }, (error) => {
@@ -4909,10 +8670,25 @@ var Stream = class {
4909
8670
  });
4910
8671
  });
4911
8672
  }
8673
+ static map(source, map) {
8674
+ return new Stream(({ ready, next, close }) => {
8675
+ source.onReady(ready);
8676
+ source.subscribe((data) => next(map(data)), close);
8677
+ return () => source.close();
8678
+ });
8679
+ }
8680
+ _markAsReady() {
8681
+ var _a;
8682
+ if (!this._isReady) {
8683
+ this._isReady = true;
8684
+ (_a = this._readyHandler) == null ? void 0 : _a.call(this);
8685
+ this._resolveReadyPromise();
8686
+ }
8687
+ }
4912
8688
  subscribe(onMessage, onClose) {
4913
- (0, import_assert2.default)(!this._messageHandler, "Stream is already subscribed to.");
4914
- (0, import_assert2.default)(!this._closeHandler, "Stream is already subscribed to.");
4915
- (0, import_assert2.default)(this._buffer);
8689
+ (0, import_node_assert3.default)(!this._messageHandler, "Stream is already subscribed to.");
8690
+ (0, import_node_assert3.default)(!this._closeHandler, "Stream is already subscribed to.");
8691
+ (0, import_node_assert3.default)(this._buffer);
4916
8692
  for (const message of this._buffer) {
4917
8693
  try {
4918
8694
  onMessage(message);
@@ -4928,6 +8704,16 @@ var Stream = class {
4928
8704
  this._messageHandler = onMessage;
4929
8705
  this._closeHandler = onClose;
4930
8706
  }
8707
+ waitUntilReady() {
8708
+ return this._readyPromise;
8709
+ }
8710
+ onReady(onReady) {
8711
+ (0, import_node_assert3.default)(!this._readyHandler, "Stream already has a handler for the ready event.");
8712
+ this._readyHandler = onReady;
8713
+ if (this._isReady) {
8714
+ onReady();
8715
+ }
8716
+ }
4931
8717
  close() {
4932
8718
  var _a, _b;
4933
8719
  if (this._isClosed) {
@@ -4967,9 +8753,9 @@ var Service = class {
4967
8753
  constructor(backend, service, schema) {
4968
8754
  for (const method of service.methodsArray) {
4969
8755
  method.resolve();
4970
- (0, import_assert3.default)(method.resolvedRequestType);
4971
- (0, import_assert3.default)(method.resolvedResponseType);
4972
- (0, import_assert3.default)(!method.requestStream, "Streaming RPC requests are not supported.");
8756
+ (0, import_node_assert4.default)(method.resolvedRequestType);
8757
+ (0, import_node_assert4.default)(method.resolvedResponseType);
8758
+ (0, import_node_assert4.default)(!method.requestStream, "Streaming RPC requests are not supported.");
4973
8759
  const requestCodec = schema.tryGetCodecForType(method.resolvedRequestType.fullName);
4974
8760
  const responseCodec = schema.tryGetCodecForType(method.resolvedResponseType.fullName);
4975
8761
  const methodName = mapRpcMethodName(method.name);
@@ -4985,14 +8771,11 @@ var Service = class {
4985
8771
  } else {
4986
8772
  this[methodName] = (request) => {
4987
8773
  const encoded = requestCodec.encode(request);
4988
- return new Stream(({ next, close }) => {
4989
- const stream = backend.callStream(method.name, {
4990
- value: encoded,
4991
- type_url: method.resolvedRequestType.fullName
4992
- });
4993
- stream.subscribe((data) => next(responseCodec.decode(data.value)), close);
4994
- return () => stream.close();
8774
+ const stream = backend.callStream(method.name, {
8775
+ value: encoded,
8776
+ type_url: method.resolvedRequestType.fullName
4995
8777
  });
8778
+ return Stream.map(stream, (data) => responseCodec.decode(data.value));
4996
8779
  };
4997
8780
  }
4998
8781
  Object.defineProperty(this[methodName], "name", { value: methodName });
@@ -5007,11 +8790,11 @@ var ServiceHandler = class {
5007
8790
  }
5008
8791
  async call(methodName, request) {
5009
8792
  const { method, requestCodec, responseCodec } = this._getMethodInfo(methodName);
5010
- (0, import_assert3.default)(!method.requestStream, "Invalid RPC method call: request streaming mismatch.");
5011
- (0, import_assert3.default)(!method.responseStream, `Invalid RPC method call: response streaming mismatch. ${methodName}`);
8793
+ (0, import_node_assert4.default)(!method.requestStream, "Invalid RPC method call: request streaming mismatch.");
8794
+ (0, import_node_assert4.default)(!method.responseStream, `Invalid RPC method call: response streaming mismatch. ${methodName}`);
5012
8795
  const mappedMethodName = mapRpcMethodName(methodName);
5013
8796
  const handler = this._handlers[mappedMethodName];
5014
- (0, import_assert3.default)(handler, `Handler is missing: ${mappedMethodName}`);
8797
+ (0, import_node_assert4.default)(handler, `Handler is missing: ${mappedMethodName}`);
5015
8798
  const requestDecoded = requestCodec.decode(request.value);
5016
8799
  const response = await handler.bind(this._handlers)(requestDecoded);
5017
8800
  const responseEncoded = responseCodec.encode(response);
@@ -5022,27 +8805,24 @@ var ServiceHandler = class {
5022
8805
  }
5023
8806
  callStream(methodName, request) {
5024
8807
  const { method, requestCodec, responseCodec } = this._getMethodInfo(methodName);
5025
- (0, import_assert3.default)(!method.requestStream, "Invalid RPC method call: request streaming mismatch.");
5026
- (0, import_assert3.default)(method.responseStream, `Invalid RPC method call: response streaming mismatch., ${methodName}`);
8808
+ (0, import_node_assert4.default)(!method.requestStream, "Invalid RPC method call: request streaming mismatch.");
8809
+ (0, import_node_assert4.default)(method.responseStream, `Invalid RPC method call: response streaming mismatch., ${methodName}`);
5027
8810
  const mappedMethodName = mapRpcMethodName(methodName);
5028
8811
  const handler = this._handlers[mappedMethodName];
5029
- (0, import_assert3.default)(handler, `Handler is missing: ${mappedMethodName}`);
8812
+ (0, import_node_assert4.default)(handler, `Handler is missing: ${mappedMethodName}`);
5030
8813
  const requestDecoded = requestCodec.decode(request.value);
5031
8814
  const responseStream = handler.bind(this._handlers)(requestDecoded);
5032
- return new Stream(({ next, close }) => {
5033
- responseStream.subscribe((data) => next({
5034
- value: responseCodec.encode(data),
5035
- type_url: method.resolvedResponseType.fullName
5036
- }), close);
5037
- return () => responseStream.close();
5038
- });
8815
+ return Stream.map(responseStream, (data) => ({
8816
+ value: responseCodec.encode(data),
8817
+ type_url: method.resolvedResponseType.fullName
8818
+ }));
5039
8819
  }
5040
8820
  _getMethodInfo(methodName) {
5041
8821
  const method = this._service.methods[methodName];
5042
- (0, import_assert3.default)(!!method, `Method not found: ${methodName}`);
8822
+ (0, import_node_assert4.default)(!!method, `Method not found: ${methodName}`);
5043
8823
  method.resolve();
5044
- (0, import_assert3.default)(method.resolvedRequestType);
5045
- (0, import_assert3.default)(method.resolvedResponseType);
8824
+ (0, import_node_assert4.default)(method.resolvedRequestType);
8825
+ (0, import_node_assert4.default)(method.resolvedResponseType);
5046
8826
  const requestCodec = this._schema.tryGetCodecForType(method.resolvedRequestType.fullName);
5047
8827
  const responseCodec = this._schema.tryGetCodecForType(method.resolvedResponseType.fullName);
5048
8828
  return { method, requestCodec, responseCodec };
@@ -5058,7 +8838,7 @@ var Schema = class {
5058
8838
  this._mapping = createMappingDescriptors(substitutions);
5059
8839
  }
5060
8840
  static fromJson(schema, substitutions = {}) {
5061
- const root = import_protobufjs2.default.Root.fromJSON(schema);
8841
+ const root = import_protobufjs3.default.Root.fromJSON(schema);
5062
8842
  return new Schema(root, substitutions);
5063
8843
  }
5064
8844
  getCodecForType(typeName) {
@@ -5090,7 +8870,7 @@ var Schema = class {
5090
8870
  if (!schema.nested) {
5091
8871
  throw new Error("Invalid schema: missing nested object");
5092
8872
  }
5093
- this._typesRoot = import_protobufjs2.Root.fromJSON((0, import_lodash.default)(this._typesRoot.toJSON(), schema));
8873
+ this._typesRoot = import_protobufjs3.Root.fromJSON((0, import_lodash.default)(this._typesRoot.toJSON(), schema));
5094
8874
  }
5095
8875
  };
5096
8876
 
@@ -5135,3 +8915,9 @@ var timestampSubstitutions = {
5135
8915
  }
5136
8916
  }
5137
8917
  };
8918
+ /*!
8919
+ * The buffer module from node.js, for the browser.
8920
+ *
8921
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
8922
+ * @license MIT
8923
+ */