@cimulate/copilot-widget 1.58.0 → 1.58.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +5 -1
- package/dist/cimulate-copilot-widget.css +1 -1
- package/dist/cimulate-copilot-widget.d.ts +11 -1
- package/dist/cimulate-copilot-widget.es.js +8266 -7959
- package/dist/cimulate-copilot-widget.umd.js +30 -30
- package/dist/client-DaAK0txn.js +1979 -0
- package/dist/collectors-CegqX1Vu.js +2793 -0
- package/dist/copilot.css +1 -1
- package/dist/copilot.es.js +8264 -7957
- package/dist/copilot.umd.js +30 -30
- package/dist/messaging.css +1 -1
- package/dist/messaging.d.ts +6 -1
- package/dist/messaging.es.js +8813 -8719
- package/dist/messaging.umd.js +33 -33
- package/dist/sf_embeddedMessaging-B3h7hoYD.js +18 -0
- package/dist/shared-v_qZLEbr.js +678 -0
- package/package.json +1 -1
|
@@ -0,0 +1,2793 @@
|
|
|
1
|
+
var vt = Object.defineProperty, wt = Object.defineProperties;
|
|
2
|
+
var _t = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Pe = Object.getOwnPropertySymbols;
|
|
4
|
+
var Ot = Object.prototype.hasOwnProperty, kt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Me = (e, i, y) => i in e ? vt(e, i, { enumerable: !0, configurable: !0, writable: !0, value: y }) : e[i] = y, J = (e, i) => {
|
|
6
|
+
for (var y in i || (i = {}))
|
|
7
|
+
Ot.call(i, y) && Me(e, y, i[y]);
|
|
8
|
+
if (Pe)
|
|
9
|
+
for (var y of Pe(i))
|
|
10
|
+
kt.call(i, y) && Me(e, y, i[y]);
|
|
11
|
+
return e;
|
|
12
|
+
}, ee = (e, i) => wt(e, _t(i));
|
|
13
|
+
var Z = (e, i, y) => new Promise((t, d) => {
|
|
14
|
+
var v = (c) => {
|
|
15
|
+
try {
|
|
16
|
+
l(y.next(c));
|
|
17
|
+
} catch (f) {
|
|
18
|
+
d(f);
|
|
19
|
+
}
|
|
20
|
+
}, o = (c) => {
|
|
21
|
+
try {
|
|
22
|
+
l(y.throw(c));
|
|
23
|
+
} catch (f) {
|
|
24
|
+
d(f);
|
|
25
|
+
}
|
|
26
|
+
}, l = (c) => c.done ? t(c.value) : Promise.resolve(c.value).then(v, o);
|
|
27
|
+
l((y = y.apply(e, i)).next());
|
|
28
|
+
});
|
|
29
|
+
import { m as ye, u as U, s as z, L as Et } from "./shared-v_qZLEbr.js";
|
|
30
|
+
const Ye = { pbjsSchema: { nested: { sf: { nested: { instrumentation: { nested: { MessageBundle: { fields: { messages: { rule: "repeated", id: 2, type: "LogMessage" }, schemaName: { id: 1, type: "string" } } }, Metrics: { fields: { globalMetricTags: { rule: "repeated", id: 4, type: "MetricTag" }, bucketHistograms: { rule: "repeated", id: 3, type: "BucketHistogram" }, valueRecorders: { rule: "repeated", id: 2, type: "ValueRecorder" }, upCounters: {
|
|
31
|
+
rule: "repeated",
|
|
32
|
+
id: 1,
|
|
33
|
+
type: "UpCounter"
|
|
34
|
+
} } }, CoreEnvelopeDiagnostics: { fields: { schemaVersion: { id: 6, type: "string" }, generatedTimestamp: { id: 2, type: "double" }, bundleCount: { id: 3, type: "uint32" }, upCounterCount: { id: 4, type: "uint32" }, valueRecorderCount: { id: 5, type: "uint32" }, key: { id: 1, type: "string" }, bucketHistogramCount: { id: 7, type: "uint32" } } }, LogMessage: { fields: { data: { id: 2, type: "bytes" }, rootId: { id: 4, type: "string" }, csId: { id: 12, type: "string" }, recCsId: {
|
|
35
|
+
id: 13,
|
|
36
|
+
type: "string"
|
|
37
|
+
}, pagePayload: { id: 7, type: "Payload" }, connectionType: { id: 9, type: "string" }, appPayload: { id: 10, type: "Payload" }, tenantClass: { id: 15, type: "string" }, loggerAppName: { id: 8, type: "string" }, sseq: { id: 11, type: "uint32" }, recRootId: { id: 14, type: "string" }, loggerName: { id: 6, type: "string" }, age: { id: 3, type: "double" }, seq: { id: 5, type: "uint32" }, timestamp: { id: 1, type: "double" } } }, CoreEnvelope: { fields: {
|
|
38
|
+
diagnostics: { id: 1, type: "CoreEnvelopeDiagnostics" },
|
|
39
|
+
bundles: { rule: "repeated", id: 2, type: "MessageBundle" },
|
|
40
|
+
metrics: { id: 3, type: "Metrics" },
|
|
41
|
+
staticAttributes: { id: 4, type: "StaticAttributes" }
|
|
42
|
+
} }, MetricTag: { fields: { name: { id: 1, type: "string" }, value: { id: 2, type: "string" } } }, BucketHistogram: { fields: { lastUpdatedTimestamp: { id: 3, type: "double" }, ownerName: { id: 7, type: "string" }, ownerAppName: { id: 8, type: "string" }, createdTimestamp: { id: 2, type: "double" }, values: { rule: "repeated", id: 4, type: "double" }, buckets: {
|
|
43
|
+
rule: "repeated",
|
|
44
|
+
id: 5,
|
|
45
|
+
type: "uint32"
|
|
46
|
+
}, name: { id: 1, type: "string" }, tags: { rule: "repeated", id: 6, type: "MetricTag" } } }, ValueRecorder: { fields: { lastUpdatedTimestamp: { id: 3, type: "double" }, ownerName: { id: 6, type: "string" }, ownerAppName: { id: 7, type: "string" }, createdTimestamp: { id: 2, type: "double" }, values: { rule: "repeated", id: 4, type: "double" }, name: { id: 1, type: "string" }, tags: { rule: "repeated", id: 5, type: "MetricTag" } } }, StaticAttributes: { fields: {
|
|
47
|
+
appVersion: { id: 2, type: "string" },
|
|
48
|
+
appName: { id: 1, type: "string" },
|
|
49
|
+
deviceModel: { id: 5, type: "string" },
|
|
50
|
+
sdkVersion: { id: 6, type: "string" },
|
|
51
|
+
deviceId: { id: 4, type: "string" },
|
|
52
|
+
appExperience: { id: 3, type: "string" }
|
|
53
|
+
} }, Payload: { fields: { payload: { id: 2, type: "bytes" }, schemaName: { id: 1, type: "string" } } }, UpCounter: { fields: {
|
|
54
|
+
lastUpdatedTimestamp: { id: 3, type: "double" },
|
|
55
|
+
ownerName: { id: 6, type: "string" },
|
|
56
|
+
ownerAppName: { id: 7, type: "string" },
|
|
57
|
+
createdTimestamp: { id: 2, type: "double" },
|
|
58
|
+
name: { id: 1, type: "string" },
|
|
59
|
+
value: { id: 4, type: "uint32" },
|
|
60
|
+
tags: { rule: "repeated", id: 5, type: "MetricTag" }
|
|
61
|
+
} } } } } } } } }, jt = "264.105.0", At = "o11y";
|
|
62
|
+
class G {
|
|
63
|
+
constructor() {
|
|
64
|
+
this._envelope = {
|
|
65
|
+
diagnostics: {
|
|
66
|
+
key: At,
|
|
67
|
+
generatedTimestamp: void 0,
|
|
68
|
+
bundleCount: 0,
|
|
69
|
+
bucketHistogramCount: 0,
|
|
70
|
+
upCounterCount: 0,
|
|
71
|
+
valueRecorderCount: 0,
|
|
72
|
+
schemaVersion: jt
|
|
73
|
+
},
|
|
74
|
+
bundles: [],
|
|
75
|
+
metrics: {
|
|
76
|
+
bucketHistograms: [],
|
|
77
|
+
upCounters: [],
|
|
78
|
+
valueRecorders: []
|
|
79
|
+
},
|
|
80
|
+
staticAttributes: {}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
withStaticAttributes(i) {
|
|
84
|
+
return this._envelope.staticAttributes = i, this;
|
|
85
|
+
}
|
|
86
|
+
withLogs(i, y) {
|
|
87
|
+
let t = this._envelope.bundles.find((d) => d.schemaName === i);
|
|
88
|
+
if (t)
|
|
89
|
+
for (const d of y)
|
|
90
|
+
t.messages.push(d);
|
|
91
|
+
else
|
|
92
|
+
t = {
|
|
93
|
+
schemaName: i,
|
|
94
|
+
messages: y
|
|
95
|
+
}, this._envelope.bundles.push(t);
|
|
96
|
+
return this._envelope.diagnostics.bundleCount = this._envelope.bundles.length, this;
|
|
97
|
+
}
|
|
98
|
+
static getUpCounters(i, y = !0) {
|
|
99
|
+
return ye.getUpCounters(i, y);
|
|
100
|
+
}
|
|
101
|
+
static getValueRecorders(i, y = !0) {
|
|
102
|
+
return ye.getValueRecorders(i, y);
|
|
103
|
+
}
|
|
104
|
+
static getBucketHistograms(i, y = !0) {
|
|
105
|
+
return ye.getBucketHistograms(i, y);
|
|
106
|
+
}
|
|
107
|
+
withUpCounters(i) {
|
|
108
|
+
for (const y of i)
|
|
109
|
+
this._envelope.metrics.upCounters.push(y);
|
|
110
|
+
return this._envelope.diagnostics.upCounterCount = this._envelope.metrics.upCounters.length, this;
|
|
111
|
+
}
|
|
112
|
+
withValueRecorders(i) {
|
|
113
|
+
for (const y of i)
|
|
114
|
+
this._envelope.metrics.valueRecorders.push(y);
|
|
115
|
+
return this._envelope.diagnostics.valueRecorderCount = this._envelope.metrics.valueRecorders.length, this;
|
|
116
|
+
}
|
|
117
|
+
withBucketHistograms(i) {
|
|
118
|
+
for (const y of i)
|
|
119
|
+
this._envelope.metrics.bucketHistograms.push(y);
|
|
120
|
+
return this._envelope.diagnostics.bucketHistogramCount = this._envelope.metrics.bucketHistograms.length, this;
|
|
121
|
+
}
|
|
122
|
+
build() {
|
|
123
|
+
return this._envelope.diagnostics.generatedTimestamp = U.time().tsNow, this._envelope;
|
|
124
|
+
}
|
|
125
|
+
static buildFrom(i) {
|
|
126
|
+
const y = new G();
|
|
127
|
+
return i.staticAttributes && y.withStaticAttributes(i.staticAttributes), i.messages && i.messages.forEach((t, d) => {
|
|
128
|
+
y.withLogs(z.getSchemaId(d), t);
|
|
129
|
+
}), i.upCounters && y.withUpCounters(i.upCounters), i.valueRecorders && y.withValueRecorders(i.valueRecorders), i.bucketHistograms && y.withBucketHistograms(i.bucketHistograms), y.build();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
var ce;
|
|
133
|
+
(function(e) {
|
|
134
|
+
var i, y;
|
|
135
|
+
i = { 1: [function(t, d, v) {
|
|
136
|
+
d.exports = function(o, l) {
|
|
137
|
+
for (var c = Array(arguments.length - 1), f = 0, r = 2, n = !0; r < arguments.length; ) c[f++] = arguments[r++];
|
|
138
|
+
return new Promise(function(a, s) {
|
|
139
|
+
c[f] = function(u) {
|
|
140
|
+
if (n) if (n = !1, u) s(u);
|
|
141
|
+
else {
|
|
142
|
+
for (var m = Array(arguments.length - 1), p = 0; p < m.length; ) m[p++] = arguments[p];
|
|
143
|
+
a.apply(null, m);
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
try {
|
|
147
|
+
o.apply(l || null, c);
|
|
148
|
+
} catch (u) {
|
|
149
|
+
n && (n = !1, s(u));
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
}, {}], 2: [function(t, d, v) {
|
|
154
|
+
v.length = function(r) {
|
|
155
|
+
var n = r.length;
|
|
156
|
+
if (!n) return 0;
|
|
157
|
+
for (var a = 0; 1 < --n % 4 && (r[0 | n] || "") == "="; ) ++a;
|
|
158
|
+
return Math.ceil(3 * r.length) / 4 - a;
|
|
159
|
+
};
|
|
160
|
+
for (var o = Array(64), l = Array(123), c = 0; c < 64; ) l[o[c] = c < 26 ? c + 65 : c < 52 ? c + 71 : c < 62 ? c - 4 : c - 59 | 43] = c++;
|
|
161
|
+
v.encode = function(r, n, a) {
|
|
162
|
+
for (var s, u = null, m = [], p = 0, b = 0; n < a; ) {
|
|
163
|
+
var h = r[n++];
|
|
164
|
+
switch (b) {
|
|
165
|
+
case 0:
|
|
166
|
+
m[p++] = o[h >> 2], s = (3 & h) << 4, b = 1;
|
|
167
|
+
break;
|
|
168
|
+
case 1:
|
|
169
|
+
m[p++] = o[s | h >> 4], s = (15 & h) << 2, b = 2;
|
|
170
|
+
break;
|
|
171
|
+
case 2:
|
|
172
|
+
m[p++] = o[s | h >> 6], m[p++] = o[63 & h], b = 0;
|
|
173
|
+
}
|
|
174
|
+
8191 < p && ((u = u || []).push(String.fromCharCode.apply(String, m)), p = 0);
|
|
175
|
+
}
|
|
176
|
+
return b && (m[p++] = o[s], m[p++] = 61, b === 1 && (m[p++] = 61)), u ? (p && u.push(String.fromCharCode.apply(String, m.slice(0, p))), u.join("")) : String.fromCharCode.apply(String, m.slice(0, p));
|
|
177
|
+
};
|
|
178
|
+
var f = "invalid encoding";
|
|
179
|
+
v.decode = function(r, n, a) {
|
|
180
|
+
for (var s, u = a, m = 0, p = 0; p < r.length; ) {
|
|
181
|
+
var b = r.charCodeAt(p++);
|
|
182
|
+
if (b == 61 && 1 < m) break;
|
|
183
|
+
if ((b = l[b]) === e) throw Error(f);
|
|
184
|
+
switch (m) {
|
|
185
|
+
case 0:
|
|
186
|
+
s = b, m = 1;
|
|
187
|
+
break;
|
|
188
|
+
case 1:
|
|
189
|
+
n[a++] = s << 2 | (48 & b) >> 4, s = b, m = 2;
|
|
190
|
+
break;
|
|
191
|
+
case 2:
|
|
192
|
+
n[a++] = (15 & s) << 4 | (60 & b) >> 2, s = b, m = 3;
|
|
193
|
+
break;
|
|
194
|
+
case 3:
|
|
195
|
+
n[a++] = (3 & s) << 6 | b, m = 0;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (m === 1) throw Error(f);
|
|
199
|
+
return a - u;
|
|
200
|
+
}, v.test = function(r) {
|
|
201
|
+
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r);
|
|
202
|
+
};
|
|
203
|
+
}, {}], 3: [function(t, d, v) {
|
|
204
|
+
d.exports = l;
|
|
205
|
+
var o = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/;
|
|
206
|
+
function l(c, f) {
|
|
207
|
+
typeof c == "string" && (f = c, c = e);
|
|
208
|
+
var r = [];
|
|
209
|
+
function n(s) {
|
|
210
|
+
if (typeof s != "string") {
|
|
211
|
+
var u = a();
|
|
212
|
+
if (l.verbose && console.log("codegen: " + u), u = "return " + u, s) {
|
|
213
|
+
for (var m = Object.keys(s), p = Array(m.length + 1), b = Array(m.length), h = 0; h < m.length; ) p[h] = m[h], b[h] = s[m[h++]];
|
|
214
|
+
return p[h] = u, Function.apply(null, p).apply(null, b);
|
|
215
|
+
}
|
|
216
|
+
return Function(u)();
|
|
217
|
+
}
|
|
218
|
+
for (var w = Array(arguments.length - 1), E = 0; E < w.length; ) w[E] = arguments[++E];
|
|
219
|
+
if (E = 0, s = s.replace(/%([%dfijs])/g, function(g, j) {
|
|
220
|
+
var _ = w[E++];
|
|
221
|
+
switch (j) {
|
|
222
|
+
case "d":
|
|
223
|
+
case "f":
|
|
224
|
+
return "" + +("" + _);
|
|
225
|
+
case "i":
|
|
226
|
+
return "" + Math.floor(_);
|
|
227
|
+
case "j":
|
|
228
|
+
return JSON.stringify(_);
|
|
229
|
+
case "s":
|
|
230
|
+
return "" + _;
|
|
231
|
+
}
|
|
232
|
+
return "%";
|
|
233
|
+
}), E !== w.length) throw Error("parameter count mismatch");
|
|
234
|
+
return r.push(s), n;
|
|
235
|
+
}
|
|
236
|
+
function a(s) {
|
|
237
|
+
return "function " + (function(u) {
|
|
238
|
+
return !u || !(u = ("" + u).replace(/[^\w$]/g, "")) ? "" : (/^\d/.test(u) && (u = "_" + u), o.test(u) ? u + "_" : u);
|
|
239
|
+
})(s || f) + "(" + (c && c.join(",") || "") + `){
|
|
240
|
+
` + r.join(`
|
|
241
|
+
`) + `
|
|
242
|
+
}`;
|
|
243
|
+
}
|
|
244
|
+
return n.toString = a, n;
|
|
245
|
+
}
|
|
246
|
+
l.verbose = !1;
|
|
247
|
+
}, {}], 4: [function(t, d, v) {
|
|
248
|
+
function o() {
|
|
249
|
+
this.t = {};
|
|
250
|
+
}
|
|
251
|
+
(d.exports = o).prototype.on = function(l, c, f) {
|
|
252
|
+
return (this.t[l] || (this.t[l] = [])).push({ fn: c, ctx: f || this }), this;
|
|
253
|
+
}, o.prototype.off = function(l, c) {
|
|
254
|
+
if (l === e) this.t = {};
|
|
255
|
+
else if (c === e) this.t[l] = [];
|
|
256
|
+
else for (var f = this.t[l], r = 0; r < f.length; ) f[r].fn === c ? f.splice(r, 1) : ++r;
|
|
257
|
+
return this;
|
|
258
|
+
}, o.prototype.emit = function(l) {
|
|
259
|
+
var c = this.t[l];
|
|
260
|
+
if (c) {
|
|
261
|
+
for (var f = [], r = 1; r < arguments.length; ) f.push(arguments[r++]);
|
|
262
|
+
for (r = 0; r < c.length; ) c[r].fn.apply(c[r++].ctx, f);
|
|
263
|
+
}
|
|
264
|
+
return this;
|
|
265
|
+
};
|
|
266
|
+
}, {}], 5: [function(t, d, v) {
|
|
267
|
+
d.exports = c;
|
|
268
|
+
var o = t(1), l = t(7)("fs");
|
|
269
|
+
function c(f, r, n) {
|
|
270
|
+
return r = typeof r == "function" ? (n = r, {}) : r || {}, n ? !r.xhr && l && l.readFile ? l.readFile(f, function(a, s) {
|
|
271
|
+
return a && typeof XMLHttpRequest != "undefined" ? c.xhr(f, r, n) : a ? n(a) : n(null, r.binary ? s : s.toString("utf8"));
|
|
272
|
+
}) : c.xhr(f, r, n) : o(c, this, f, r);
|
|
273
|
+
}
|
|
274
|
+
c.xhr = function(f, r, n) {
|
|
275
|
+
var a = new XMLHttpRequest();
|
|
276
|
+
a.onreadystatechange = function() {
|
|
277
|
+
if (a.readyState !== 4) return e;
|
|
278
|
+
if (a.status !== 0 && a.status !== 200) return n(Error("status " + a.status));
|
|
279
|
+
if (r.binary) {
|
|
280
|
+
if (!(s = a.response)) for (var s = [], u = 0; u < a.responseText.length; ++u) s.push(255 & a.responseText.charCodeAt(u));
|
|
281
|
+
return n(null, typeof Uint8Array != "undefined" ? new Uint8Array(s) : s);
|
|
282
|
+
}
|
|
283
|
+
return n(null, a.responseText);
|
|
284
|
+
}, r.binary && ("overrideMimeType" in a && a.overrideMimeType("text/plain; charset=x-user-defined"), a.responseType = "arraybuffer"), a.open("GET", f), a.send();
|
|
285
|
+
};
|
|
286
|
+
}, { 1: 1, 7: 7 }], 6: [function(t, d, v) {
|
|
287
|
+
function o(n) {
|
|
288
|
+
function a(T, k, A, S) {
|
|
289
|
+
var C = k < 0 ? 1 : 0;
|
|
290
|
+
T((k = C ? -k : k) === 0 ? 0 < 1 / k ? 0 : 2147483648 : isNaN(k) ? 2143289344 : 34028234663852886e22 < k ? (C << 31 | 2139095040) >>> 0 : k < 11754943508222875e-54 ? (C << 31 | Math.round(k / 1401298464324817e-60)) >>> 0 : (C << 31 | 127 + (T = Math.floor(Math.log(k) / Math.LN2)) << 23 | 8388607 & Math.round(k * Math.pow(2, -T) * 8388608)) >>> 0, A, S);
|
|
291
|
+
}
|
|
292
|
+
function s(T, k, A) {
|
|
293
|
+
return T = T(k, A), k = 2 * (T >> 31) + 1, A = T >>> 23 & 255, T &= 8388607, A == 255 ? T ? NaN : 1 / 0 * k : A == 0 ? 1401298464324817e-60 * k * T : k * Math.pow(2, A - 150) * (8388608 + T);
|
|
294
|
+
}
|
|
295
|
+
function u(T, k, A) {
|
|
296
|
+
h[0] = T, k[A] = w[0], k[A + 1] = w[1], k[A + 2] = w[2], k[A + 3] = w[3];
|
|
297
|
+
}
|
|
298
|
+
function m(T, k, A) {
|
|
299
|
+
h[0] = T, k[A] = w[3], k[A + 1] = w[2], k[A + 2] = w[1], k[A + 3] = w[0];
|
|
300
|
+
}
|
|
301
|
+
function p(T, k) {
|
|
302
|
+
return w[0] = T[k], w[1] = T[k + 1], w[2] = T[k + 2], w[3] = T[k + 3], h[0];
|
|
303
|
+
}
|
|
304
|
+
function b(T, k) {
|
|
305
|
+
return w[3] = T[k], w[2] = T[k + 1], w[1] = T[k + 2], w[0] = T[k + 3], h[0];
|
|
306
|
+
}
|
|
307
|
+
var h, w, E, g, j;
|
|
308
|
+
function _(T, k, A, S, C, I) {
|
|
309
|
+
var B, W = S < 0 ? 1 : 0;
|
|
310
|
+
(S = W ? -S : S) === 0 ? (T(0, C, I + k), T(0 < 1 / S ? 0 : 2147483648, C, I + A)) : isNaN(S) ? (T(0, C, I + k), T(2146959360, C, I + A)) : 17976931348623157e292 < S ? (T(0, C, I + k), T((W << 31 | 2146435072) >>> 0, C, I + A)) : S < 22250738585072014e-324 ? (T((B = S / 5e-324) >>> 0, C, I + k), T((W << 31 | B / 4294967296) >>> 0, C, I + A)) : (T(4503599627370496 * (B = S * Math.pow(2, -(S = (S = Math.floor(Math.log(S) / Math.LN2)) === 1024 ? 1023 : S))) >>> 0, C, I + k), T((W << 31 | S + 1023 << 20 | 1048576 * B & 1048575) >>> 0, C, I + A));
|
|
311
|
+
}
|
|
312
|
+
function O(T, k, A, S, C) {
|
|
313
|
+
return k = T(S, C + k), T = T(S, C + A), S = 2 * (T >> 31) + 1, C = T >>> 20 & 2047, A = 4294967296 * (1048575 & T) + k, C == 2047 ? A ? NaN : 1 / 0 * S : C == 0 ? 5e-324 * S * A : S * Math.pow(2, C - 1075) * (A + 4503599627370496);
|
|
314
|
+
}
|
|
315
|
+
function x(T, k, A) {
|
|
316
|
+
E[0] = T, k[A] = g[0], k[A + 1] = g[1], k[A + 2] = g[2], k[A + 3] = g[3], k[A + 4] = g[4], k[A + 5] = g[5], k[A + 6] = g[6], k[A + 7] = g[7];
|
|
317
|
+
}
|
|
318
|
+
function N(T, k, A) {
|
|
319
|
+
E[0] = T, k[A] = g[7], k[A + 1] = g[6], k[A + 2] = g[5], k[A + 3] = g[4], k[A + 4] = g[3], k[A + 5] = g[2], k[A + 6] = g[1], k[A + 7] = g[0];
|
|
320
|
+
}
|
|
321
|
+
function L(T, k) {
|
|
322
|
+
return g[0] = T[k], g[1] = T[k + 1], g[2] = T[k + 2], g[3] = T[k + 3], g[4] = T[k + 4], g[5] = T[k + 5], g[6] = T[k + 6], g[7] = T[k + 7], E[0];
|
|
323
|
+
}
|
|
324
|
+
function M(T, k) {
|
|
325
|
+
return g[7] = T[k], g[6] = T[k + 1], g[5] = T[k + 2], g[4] = T[k + 3], g[3] = T[k + 4], g[2] = T[k + 5], g[1] = T[k + 6], g[0] = T[k + 7], E[0];
|
|
326
|
+
}
|
|
327
|
+
return typeof Float32Array != "undefined" ? (h = new Float32Array([-0]), w = new Uint8Array(h.buffer), j = w[3] === 128, n.writeFloatLE = j ? u : m, n.writeFloatBE = j ? m : u, n.readFloatLE = j ? p : b, n.readFloatBE = j ? b : p) : (n.writeFloatLE = a.bind(null, l), n.writeFloatBE = a.bind(null, c), n.readFloatLE = s.bind(null, f), n.readFloatBE = s.bind(null, r)), typeof Float64Array != "undefined" ? (E = new Float64Array([-0]), g = new Uint8Array(E.buffer), j = g[7] === 128, n.writeDoubleLE = j ? x : N, n.writeDoubleBE = j ? N : x, n.readDoubleLE = j ? L : M, n.readDoubleBE = j ? M : L) : (n.writeDoubleLE = _.bind(null, l, 0, 4), n.writeDoubleBE = _.bind(null, c, 4, 0), n.readDoubleLE = O.bind(null, f, 0, 4), n.readDoubleBE = O.bind(null, r, 4, 0)), n;
|
|
328
|
+
}
|
|
329
|
+
function l(n, a, s) {
|
|
330
|
+
a[s] = 255 & n, a[s + 1] = n >>> 8 & 255, a[s + 2] = n >>> 16 & 255, a[s + 3] = n >>> 24;
|
|
331
|
+
}
|
|
332
|
+
function c(n, a, s) {
|
|
333
|
+
a[s] = n >>> 24, a[s + 1] = n >>> 16 & 255, a[s + 2] = n >>> 8 & 255, a[s + 3] = 255 & n;
|
|
334
|
+
}
|
|
335
|
+
function f(n, a) {
|
|
336
|
+
return (n[a] | n[a + 1] << 8 | n[a + 2] << 16 | n[a + 3] << 24) >>> 0;
|
|
337
|
+
}
|
|
338
|
+
function r(n, a) {
|
|
339
|
+
return (n[a] << 24 | n[a + 1] << 16 | n[a + 2] << 8 | n[a + 3]) >>> 0;
|
|
340
|
+
}
|
|
341
|
+
d.exports = o(o);
|
|
342
|
+
}, {}], 7: [function(t, d, v) {
|
|
343
|
+
d.exports = function(o) {
|
|
344
|
+
try {
|
|
345
|
+
var l;
|
|
346
|
+
return typeof t != "function" ? null : (l = t(o)) && (l.length || Object.keys(l).length) ? l : null;
|
|
347
|
+
} catch (c) {
|
|
348
|
+
return null;
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
}, {}], 8: [function(t, d, v) {
|
|
352
|
+
var o = v.isAbsolute = function(c) {
|
|
353
|
+
return /^(?:\/|\w+:)/.test(c);
|
|
354
|
+
}, l = v.normalize = function(n) {
|
|
355
|
+
var f = (n = n.replace(/\\/g, "/").replace(/\/{2,}/g, "/")).split("/"), r = o(n), n = "";
|
|
356
|
+
r && (n = f.shift() + "/");
|
|
357
|
+
for (var a = 0; a < f.length; ) f[a] === ".." ? 0 < a && f[a - 1] !== ".." ? f.splice(--a, 2) : r ? f.splice(a, 1) : ++a : f[a] === "." ? f.splice(a, 1) : ++a;
|
|
358
|
+
return n + f.join("/");
|
|
359
|
+
};
|
|
360
|
+
v.resolve = function(c, f, r) {
|
|
361
|
+
return r || (f = l(f)), !o(f) && (c = (c = r ? c : l(c)).replace(/(?:\/|^)[^/]+$/, "")).length ? l(c + "/" + f) : f;
|
|
362
|
+
};
|
|
363
|
+
}, {}], 9: [function(t, d, v) {
|
|
364
|
+
d.exports = function(o, l, c) {
|
|
365
|
+
var f = c || 8192, r = f >>> 1, n = null, a = f;
|
|
366
|
+
return function(s) {
|
|
367
|
+
return s < 1 || r < s ? o(s) : (f < a + s && (n = o(f), a = 0), s = l.call(n, a, a += s), 7 & a && (a = 1 + (7 | a)), s);
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
}, {}], 10: [function(t, d, v) {
|
|
371
|
+
v.length = function(o) {
|
|
372
|
+
for (var l, c = 0, f = 0; f < o.length; ++f) (l = o.charCodeAt(f)) < 128 ? c += 1 : l < 2048 ? c += 2 : (64512 & l) == 55296 && (64512 & o.charCodeAt(f + 1)) == 56320 ? (++f, c += 4) : c += 3;
|
|
373
|
+
return c;
|
|
374
|
+
}, v.read = function(o, l, c) {
|
|
375
|
+
if (c - l < 1) return "";
|
|
376
|
+
for (var f = "", r = l; r < c; ) {
|
|
377
|
+
var n, a = o[r++];
|
|
378
|
+
a <= 127 ? f += String.fromCharCode(a) : 192 <= a && a < 224 ? f += 128 <= (n = (31 & a) << 6 | 63 & o[r++]) ? String.fromCharCode(n) : "�" : 224 <= a && a < 240 ? f += 2048 <= (n = (15 & a) << 12 | (63 & o[r++]) << 6 | 63 & o[r++]) ? String.fromCharCode(n) : "�" : 240 <= a && ((a = (7 & a) << 18 | (63 & o[r++]) << 12 | (63 & o[r++]) << 6 | 63 & o[r++]) < 65536 || 1114111 < a ? f += "�" : f = f + String.fromCharCode(55296 + ((a -= 65536) >> 10)) + String.fromCharCode(56320 + (1023 & a)));
|
|
379
|
+
}
|
|
380
|
+
return f;
|
|
381
|
+
}, v.write = function(o, l, c) {
|
|
382
|
+
for (var f, r, n = c, a = 0; a < o.length; ++a) (f = o.charCodeAt(a)) < 128 ? l[c++] = f : (f < 2048 ? l[c++] = f >> 6 | 192 : ((64512 & f) == 55296 && (64512 & (r = o.charCodeAt(a + 1))) == 56320 ? (++a, l[c++] = (f = 65536 + ((1023 & f) << 10) + (1023 & r)) >> 18 | 240, l[c++] = f >> 12 & 63 | 128) : l[c++] = f >> 12 | 224, l[c++] = f >> 6 & 63 | 128), l[c++] = 63 & f | 128);
|
|
383
|
+
return c - n;
|
|
384
|
+
};
|
|
385
|
+
}, {}], 11: [function(t, d, v) {
|
|
386
|
+
var o = t(14), l = t(33);
|
|
387
|
+
function c(r, n, a, s) {
|
|
388
|
+
var u = !1;
|
|
389
|
+
if (n.resolvedType) if (n.resolvedType instanceof o) {
|
|
390
|
+
r("switch(d%s){", s);
|
|
391
|
+
for (var m = n.resolvedType.values, p = Object.keys(m), b = 0; b < p.length; ++b) m[p[b]] !== n.typeDefault || u || (r("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', s, s, s), n.repeated || r("break"), u = !0), r("case%j:", p[b])("case %i:", m[p[b]])("m%s=%j", s, m[p[b]])("break");
|
|
392
|
+
r("}");
|
|
393
|
+
} else r('if(typeof d%s!=="object")', s)("throw TypeError(%j)", n.fullName + ": object expected")("m%s=types[%i].fromObject(d%s,n+1)", s, a, s);
|
|
394
|
+
else {
|
|
395
|
+
var h = !1;
|
|
396
|
+
switch (n.type) {
|
|
397
|
+
case "double":
|
|
398
|
+
case "float":
|
|
399
|
+
r("m%s=Number(d%s)", s, s);
|
|
400
|
+
break;
|
|
401
|
+
case "uint32":
|
|
402
|
+
case "fixed32":
|
|
403
|
+
r("m%s=d%s>>>0", s, s);
|
|
404
|
+
break;
|
|
405
|
+
case "int32":
|
|
406
|
+
case "sint32":
|
|
407
|
+
case "sfixed32":
|
|
408
|
+
r("m%s=d%s|0", s, s);
|
|
409
|
+
break;
|
|
410
|
+
case "uint64":
|
|
411
|
+
h = !0;
|
|
412
|
+
case "int64":
|
|
413
|
+
case "sint64":
|
|
414
|
+
case "fixed64":
|
|
415
|
+
case "sfixed64":
|
|
416
|
+
r("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j", s, s, h)('else if(typeof d%s==="string")', s)("m%s=parseInt(d%s,10)", s, s)('else if(typeof d%s==="number")', s)("m%s=d%s", s, s)('else if(typeof d%s==="object")', s)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)", s, s, s, h ? "true" : "");
|
|
417
|
+
break;
|
|
418
|
+
case "bytes":
|
|
419
|
+
r('if(typeof d%s==="string")', s)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)", s, s, s)("else if(d%s.length >= 0)", s)("m%s=d%s", s, s);
|
|
420
|
+
break;
|
|
421
|
+
case "string":
|
|
422
|
+
r("m%s=String(d%s)", s, s);
|
|
423
|
+
break;
|
|
424
|
+
case "bool":
|
|
425
|
+
r("m%s=Boolean(d%s)", s, s);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return r;
|
|
429
|
+
}
|
|
430
|
+
function f(r, n, a, s) {
|
|
431
|
+
if (n.resolvedType) n.resolvedType instanceof o ? r("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s", s, a, s, s, a, s, s) : r("d%s=types[%i].toObject(m%s,o)", s, a, s);
|
|
432
|
+
else {
|
|
433
|
+
var u = !1;
|
|
434
|
+
switch (n.type) {
|
|
435
|
+
case "double":
|
|
436
|
+
case "float":
|
|
437
|
+
r("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s", s, s, s, s);
|
|
438
|
+
break;
|
|
439
|
+
case "uint64":
|
|
440
|
+
u = !0;
|
|
441
|
+
case "int64":
|
|
442
|
+
case "sint64":
|
|
443
|
+
case "fixed64":
|
|
444
|
+
case "sfixed64":
|
|
445
|
+
r('if(typeof m%s==="number")', s)("d%s=o.longs===String?String(m%s):m%s", s, s, s)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s", s, s, s, s, u ? "true" : "", s);
|
|
446
|
+
break;
|
|
447
|
+
case "bytes":
|
|
448
|
+
r("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s", s, s, s, s, s);
|
|
449
|
+
break;
|
|
450
|
+
default:
|
|
451
|
+
r("d%s=m%s", s, s);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
return r;
|
|
455
|
+
}
|
|
456
|
+
v.fromObject = function(r) {
|
|
457
|
+
var n = r.fieldsArray, a = l.codegen(["d", "n"], r.name + "$fromObject")("if(d instanceof this.ctor)")("return d")("if(n===undefined)n=0")("if(n>util.recursionLimit)")('throw Error("maximum nesting depth exceeded")');
|
|
458
|
+
if (!n.length) return a("return new this.ctor");
|
|
459
|
+
a("var m=new this.ctor");
|
|
460
|
+
for (var s = 0; s < n.length; ++s) {
|
|
461
|
+
var u = n[s].resolve(), m = l.safeProp(u.name);
|
|
462
|
+
u.map ? (a("if(d%s){", m)('if(typeof d%s!=="object")', m)("throw TypeError(%j)", u.fullName + ": object expected")("m%s={}", m)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", m), a('if(ks[i]==="__proto__")')("util.makeProp(m%s,ks[i])", m), c(a, u, s, m + "[ks[i]]")("}")("}")) : u.repeated ? (a("if(d%s){", m)("if(!Array.isArray(d%s))", m)("throw TypeError(%j)", u.fullName + ": array expected")("m%s=[]", m)("for(var i=0;i<d%s.length;++i){", m), c(a, u, s, m + "[i]")("}")("}")) : (u.resolvedType instanceof o || a("if(d%s!=null){", m), c(a, u, s, m), u.resolvedType instanceof o || a("}"));
|
|
463
|
+
}
|
|
464
|
+
return a("return m");
|
|
465
|
+
}, v.toObject = function(r) {
|
|
466
|
+
var n = r.fieldsArray.slice().sort(l.compareFieldsById);
|
|
467
|
+
if (!n.length) return l.codegen()("return {}");
|
|
468
|
+
for (var a = l.codegen(["m", "o"], r.name + "$toObject")("if(!o)")("o={}")("var d={}"), s = [], u = [], m = [], p = 0; p < n.length; ++p) n[p].partOf || (n[p].resolve().repeated ? s : n[p].map ? u : m).push(n[p]);
|
|
469
|
+
if (s.length) {
|
|
470
|
+
for (a("if(o.arrays||o.defaults){"), p = 0; p < s.length; ++p) a("d%s=[]", l.safeProp(s[p].name));
|
|
471
|
+
a("}");
|
|
472
|
+
}
|
|
473
|
+
if (u.length) {
|
|
474
|
+
for (a("if(o.objects||o.defaults){"), p = 0; p < u.length; ++p) a("d%s={}", l.safeProp(u[p].name));
|
|
475
|
+
a("}");
|
|
476
|
+
}
|
|
477
|
+
if (m.length) {
|
|
478
|
+
for (a("if(o.defaults){"), p = 0; p < m.length; ++p) {
|
|
479
|
+
var b, h = m[p], w = l.safeProp(h.name);
|
|
480
|
+
h.resolvedType instanceof o ? a("d%s=o.enums===String?%j:%j", w, h.resolvedType.valuesById[h.typeDefault], h.typeDefault) : h.long ? a("if(util.Long){")("var n=new util.Long(%i,%i,%j)", h.typeDefault.low, h.typeDefault.high, h.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", w)("}else")("d%s=o.longs===String?%j:%i", w, h.typeDefault.toString(), h.typeDefault.toNumber()) : h.bytes ? (b = Array.prototype.slice.call(h.typeDefault), a("if(o.bytes===String)d%s=%j", w, String.fromCharCode.apply(String, h.typeDefault))("else{")("d%s=%j", w, b)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", w, w)("}")) : a("d%s=%j", w, h.typeDefault);
|
|
481
|
+
}
|
|
482
|
+
a("}");
|
|
483
|
+
}
|
|
484
|
+
for (var E = !1, p = 0; p < n.length; ++p) {
|
|
485
|
+
var h = n[p], g = r.i.indexOf(h), w = l.safeProp(h.name);
|
|
486
|
+
h.map ? (E || (E = !0, a("var ks2")), a("if(m%s&&(ks2=Object.keys(m%s)).length){", w, w)("d%s={}", w)("for(var j=0;j<ks2.length;++j){"), a('if(ks2[j]==="__proto__")')("util.makeProp(d%s,ks2[j])", w), f(a, h, g, w + "[ks2[j]]")("}")) : h.repeated ? (a("if(m%s&&m%s.length){", w, w)("d%s=[]", w)("for(var j=0;j<m%s.length;++j){", w), f(a, h, g, w + "[j]")("}")) : (a("if(m%s!=null&&m.hasOwnProperty(%j)){", w, h.name), f(a, h, g, w), h.partOf && a("if(o.oneofs)")("d%s=%j", l.safeProp(h.partOf.name), h.name)), a("}");
|
|
487
|
+
}
|
|
488
|
+
return a("return d");
|
|
489
|
+
};
|
|
490
|
+
}, { 14: 14, 33: 33 }], 12: [function(t, d, v) {
|
|
491
|
+
d.exports = function(f) {
|
|
492
|
+
for (var r = c.codegen(["r", "l", "e", "n"], f.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("if(n===undefined)n=0")("if(n>Reader.recursionLimit)")('throw Error("maximum nesting depth exceeded")')("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (f.fieldsArray.filter(function(p) {
|
|
493
|
+
return p.map;
|
|
494
|
+
}).length ? ",k,value" : ""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"), n = 0; n < f.fieldsArray.length; ++n) {
|
|
495
|
+
var a = f.i[n].resolve(), s = a.resolvedType instanceof o ? "int32" : a.type, u = "m" + c.safeProp(a.name);
|
|
496
|
+
r("case %i: {", a.id), a.map ? (r("if(%s===util.emptyObject)", u)("%s={}", u)("var c2 = r.uint32()+r.pos"), l.defaults[a.keyType] !== e ? r("k=%j", l.defaults[a.keyType]) : r("k=null"), l.defaults[s] !== e ? r("value=%j", l.defaults[s]) : r("value=null"), r("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break", a.keyType)("case 2:"), l.basic[s] === e ? r("value=types[%i].decode(r,r.uint32(),undefined,n+1)", n) : r("value=r.%s()", s), r("break")("default:")("r.skipType(tag2&7,n)")("break")("}")("}"), l.long[a.keyType] !== e ? r('%s[typeof k==="object"?util.longToHash(k):k]=value', u) : (a.keyType === "string" && r('if(k==="__proto__")')("util.makeProp(%s,k)", u), r("%s[k]=value", u))) : a.repeated ? (r("if(!(%s&&%s.length))", u, u)("%s=[]", u), l.packed[s] !== e && r("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", u, s)("}else"), l.basic[s] === e ? r(a.delimited ? "%s.push(types[%i].decode(r,undefined,((t&~7)|4),n+1))" : "%s.push(types[%i].decode(r,r.uint32(),undefined,n+1))", u, n) : r("%s.push(r.%s())", u, s)) : l.basic[s] === e ? r(a.delimited ? "%s=types[%i].decode(r,undefined,((t&~7)|4),n+1)" : "%s=types[%i].decode(r,r.uint32(),undefined,n+1)", u, n) : r("%s=r.%s()", u, s), r("break")("}");
|
|
497
|
+
}
|
|
498
|
+
for (r("default:")("r.skipType(t&7,n)")("break")("}")("}"), n = 0; n < f.i.length; ++n) {
|
|
499
|
+
var m = f.i[n];
|
|
500
|
+
m.required && r("if(!m.hasOwnProperty(%j))", m.name)("throw util.ProtocolError(%j,{instance:m})", "missing required '" + m.name + "'");
|
|
501
|
+
}
|
|
502
|
+
return r("return m");
|
|
503
|
+
};
|
|
504
|
+
var o = t(14), l = t(32), c = t(33);
|
|
505
|
+
}, { 14: 14, 32: 32, 33: 33 }], 13: [function(t, d, v) {
|
|
506
|
+
d.exports = function(r) {
|
|
507
|
+
for (var n, a = c.codegen(["m", "w"], r.name + "$encode")("if(!w)")("w=Writer.create()"), s = r.fieldsArray.slice().sort(c.compareFieldsById), u = 0; u < s.length; ++u) {
|
|
508
|
+
var m = s[u].resolve(), p = r.i.indexOf(m), b = m.resolvedType instanceof o ? "int32" : m.type, h = l.basic[b];
|
|
509
|
+
n = "m" + c.safeProp(m.name), m.map ? (a("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", n, m.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", n)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (m.id << 3 | 2) >>> 0, 8 | l.mapKey[m.keyType], m.keyType), h === e ? a("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", p, n) : a(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | h, b, n), a("}")("}")) : m.repeated ? (a("if(%s!=null&&%s.length){", n, n), m.packed && l.packed[b] !== e ? a("w.uint32(%i).fork()", (m.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", n)("w.%s(%s[i])", b, n)("w.ldelim()") : (a("for(var i=0;i<%s.length;++i)", n), h === e ? f(a, m, p, n + "[i]") : a("w.uint32(%i).%s(%s[i])", (m.id << 3 | h) >>> 0, b, n)), a("}")) : (m.optional && a("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", n, m.name), h === e ? f(a, m, p, n) : a("w.uint32(%i).%s(%s)", (m.id << 3 | h) >>> 0, b, n));
|
|
510
|
+
}
|
|
511
|
+
return a("return w");
|
|
512
|
+
};
|
|
513
|
+
var o = t(14), l = t(32), c = t(33);
|
|
514
|
+
function f(r, n, a, s) {
|
|
515
|
+
n.delimited ? r("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", a, s, (n.id << 3 | 3) >>> 0, (n.id << 3 | 4) >>> 0) : r("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", a, s, (n.id << 3 | 2) >>> 0);
|
|
516
|
+
}
|
|
517
|
+
}, { 14: 14, 32: 32, 33: 33 }], 14: [function(t, d, v) {
|
|
518
|
+
d.exports = f;
|
|
519
|
+
var o = t(22), l = (((f.prototype = Object.create(o.prototype)).constructor = f).className = "Enum", t(21)), c = t(33);
|
|
520
|
+
function f(r, n, a, s, u, m) {
|
|
521
|
+
if (o.call(this, r, a), n && typeof n != "object") throw TypeError("values must be an object");
|
|
522
|
+
if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = s, this.comments = u || {}, this.valuesOptions = m, this.n = {}, this.reserved = e, n) for (var p = Object.keys(n), b = 0; b < p.length; ++b) p[b] !== "__proto__" && typeof n[p[b]] == "number" && (this.valuesById[this.values[p[b]] = n[p[b]]] = p[b]);
|
|
523
|
+
}
|
|
524
|
+
f.prototype.r = function(r) {
|
|
525
|
+
return r = this.e || r, o.prototype.r.call(this, r), Object.keys(this.values).forEach((n) => {
|
|
526
|
+
var a = Object.assign({}, this.o);
|
|
527
|
+
this.n[n] = Object.assign(a, this.valuesOptions && this.valuesOptions[n] && this.valuesOptions[n].features);
|
|
528
|
+
}), this;
|
|
529
|
+
}, f.fromJSON = function(r, n) {
|
|
530
|
+
return r = new f(r, n.values, n.options, n.comment, n.comments), r.reserved = n.reserved, n.edition && (r.e = n.edition), r.u = "proto3", r;
|
|
531
|
+
}, f.prototype.toJSON = function(r) {
|
|
532
|
+
return r = !!r && !!r.keepComments, c.toObject(["edition", this.h(), "options", this.options, "valuesOptions", this.valuesOptions, "values", this.values, "reserved", this.reserved && this.reserved.length ? this.reserved : e, "comment", r ? this.comment : e, "comments", r ? this.comments : e]);
|
|
533
|
+
}, f.prototype.add = function(r, n, a, s) {
|
|
534
|
+
if (!c.isString(r)) throw TypeError("name must be a string");
|
|
535
|
+
if (!c.isInteger(n)) throw TypeError("id must be an integer");
|
|
536
|
+
if (r !== "__proto__") {
|
|
537
|
+
if (this.values[r] !== e) throw Error("duplicate name '" + r + "' in " + this);
|
|
538
|
+
if (this.isReservedId(n)) throw Error("id " + n + " is reserved in " + this);
|
|
539
|
+
if (this.isReservedName(r)) throw Error("name '" + r + "' is reserved in " + this);
|
|
540
|
+
if (this.valuesById[n] !== e) {
|
|
541
|
+
if (!this.options || !this.options.allow_alias) throw Error("duplicate id " + n + " in " + this);
|
|
542
|
+
this.values[r] = n;
|
|
543
|
+
} else this.valuesById[this.values[r] = n] = r;
|
|
544
|
+
s && (this.valuesOptions === e && (this.valuesOptions = {}), this.valuesOptions[r] = s || null), this.comments[r] = a || null;
|
|
545
|
+
}
|
|
546
|
+
return this;
|
|
547
|
+
}, f.prototype.remove = function(r) {
|
|
548
|
+
if (!c.isString(r)) throw TypeError("name must be a string");
|
|
549
|
+
var n = this.values[r];
|
|
550
|
+
if (n == null) throw Error("name '" + r + "' does not exist in " + this);
|
|
551
|
+
return delete this.valuesById[n], delete this.values[r], delete this.comments[r], this.valuesOptions && delete this.valuesOptions[r], this;
|
|
552
|
+
}, f.prototype.isReservedId = function(r) {
|
|
553
|
+
return l.isReservedId(this.reserved, r);
|
|
554
|
+
}, f.prototype.isReservedName = function(r) {
|
|
555
|
+
return l.isReservedName(this.reserved, r);
|
|
556
|
+
};
|
|
557
|
+
}, { 21: 21, 22: 22, 33: 33 }], 15: [function(t, d, v) {
|
|
558
|
+
d.exports = a;
|
|
559
|
+
var o, l = t(22), c = (((a.prototype = Object.create(l.prototype)).constructor = a).className = "Field", t(14)), f = t(32), r = t(33), n = /^required|optional|repeated$/;
|
|
560
|
+
function a(s, u, m, p, b, h, w) {
|
|
561
|
+
if (r.isObject(p) ? (w = b, h = p, p = b = e) : r.isObject(b) && (w = h, h = b, b = e), l.call(this, s, h), !r.isInteger(u) || u < 0) throw TypeError("id must be a non-negative integer");
|
|
562
|
+
if (!r.isString(m)) throw TypeError("type must be a string");
|
|
563
|
+
if (p !== e && !n.test(p = p.toString().toLowerCase())) throw TypeError("rule must be a string rule");
|
|
564
|
+
if (b !== e && !r.isString(b)) throw TypeError("extend must be a string");
|
|
565
|
+
this.rule = (p = p === "proto3_optional" ? "optional" : p) && p !== "optional" ? p : e, this.type = m, this.id = u, this.extend = b || e, this.repeated = p === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = !!r.Long && f.long[m] !== e, this.bytes = m === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this.comment = w;
|
|
566
|
+
}
|
|
567
|
+
a.fromJSON = function(s, u) {
|
|
568
|
+
return s = new a(s, u.id, u.type, u.rule, u.extend, u.options, u.comment), u.edition && (s.e = u.edition), s.u = "proto3", s;
|
|
569
|
+
}, Object.defineProperty(a.prototype, "required", { get: function() {
|
|
570
|
+
return this.o.field_presence === "LEGACY_REQUIRED";
|
|
571
|
+
} }), Object.defineProperty(a.prototype, "optional", { get: function() {
|
|
572
|
+
return !this.required;
|
|
573
|
+
} }), Object.defineProperty(a.prototype, "delimited", { get: function() {
|
|
574
|
+
return this.resolvedType instanceof o && this.o.message_encoding === "DELIMITED";
|
|
575
|
+
} }), Object.defineProperty(a.prototype, "packed", { get: function() {
|
|
576
|
+
return this.o.repeated_field_encoding === "PACKED";
|
|
577
|
+
} }), Object.defineProperty(a.prototype, "hasPresence", { get: function() {
|
|
578
|
+
return !this.repeated && !this.map && (this.partOf || this.declaringField || this.extensionField || this.o.field_presence !== "IMPLICIT");
|
|
579
|
+
} }), a.prototype.setOption = function(s, u, m) {
|
|
580
|
+
return l.prototype.setOption.call(this, s, u, m);
|
|
581
|
+
}, a.prototype.toJSON = function(s) {
|
|
582
|
+
return s = !!s && !!s.keepComments, r.toObject(["edition", this.h(), "rule", this.rule !== "optional" && this.rule || e, "type", this.type, "id", this.id, "extend", this.extend, "options", this.options, "comment", s ? this.comment : e]);
|
|
583
|
+
}, a.prototype.resolve = function() {
|
|
584
|
+
var s;
|
|
585
|
+
return this.resolved ? this : ((this.typeDefault = f.defaults[this.type]) === e ? (this.resolvedType = (this.declaringField || this).parent.lookupTypeOrEnum(this.type), this.resolvedType instanceof o ? this.typeDefault = null : this.typeDefault = this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]) : this.options && this.options.proto3_optional && (this.typeDefault = null), this.options && this.options.default != null && (this.typeDefault = this.options.default, this.resolvedType instanceof c && typeof this.typeDefault == "string" && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && (this.options.packed === e || !this.resolvedType || this.resolvedType instanceof c || delete this.options.packed, Object.keys(this.options).length || (this.options = e)), this.long ? (this.typeDefault = r.Long.fromNumber(this.typeDefault, (this.type[0] || "") == "u"), Object.freeze && Object.freeze(this.typeDefault)) : this.bytes && typeof this.typeDefault == "string" && (r.base64.test(this.typeDefault) ? r.base64.decode(this.typeDefault, s = r.newBuffer(r.base64.length(this.typeDefault)), 0) : r.utf8.write(this.typeDefault, s = r.newBuffer(r.utf8.length(this.typeDefault)), 0), this.typeDefault = s), this.map ? this.defaultValue = r.emptyObject : this.repeated ? this.defaultValue = r.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof o && (this.parent.ctor.prototype[this.name] = this.defaultValue), l.prototype.resolve.call(this));
|
|
586
|
+
}, a.prototype.f = function(s) {
|
|
587
|
+
var u;
|
|
588
|
+
return s !== "proto2" && s !== "proto3" ? {} : (s = {}, this.rule === "required" && (s.field_presence = "LEGACY_REQUIRED"), this.parent && f.defaults[this.type] === e && (u = this.parent.get(this.type.split(".").pop())) && u instanceof o && u.group && (s.message_encoding = "DELIMITED"), this.getOption("packed") === !0 ? s.repeated_field_encoding = "PACKED" : this.getOption("packed") === !1 && (s.repeated_field_encoding = "EXPANDED"), s);
|
|
589
|
+
}, a.prototype.r = function(s) {
|
|
590
|
+
return l.prototype.r.call(this, this.e || s);
|
|
591
|
+
}, a.d = function(s, u, m, p) {
|
|
592
|
+
return typeof u == "function" ? u = r.decorateType(u).name : u && typeof u == "object" && (u = r.decorateEnum(u).name), function(b, h) {
|
|
593
|
+
r.decorateType(b.constructor).add(new a(h, s, u, m, { default: p }));
|
|
594
|
+
};
|
|
595
|
+
}, a.c = function(s) {
|
|
596
|
+
o = s;
|
|
597
|
+
};
|
|
598
|
+
}, { 14: 14, 22: 22, 32: 32, 33: 33 }], 16: [function(t, d, v) {
|
|
599
|
+
var o = d.exports = t(17);
|
|
600
|
+
o.build = "light", o.load = function(l, c, f) {
|
|
601
|
+
return (c = typeof c == "function" ? (f = c, new o.Root()) : c || new o.Root()).load(l, f);
|
|
602
|
+
}, o.loadSync = function(l, c) {
|
|
603
|
+
return (c = c || new o.Root()).loadSync(l);
|
|
604
|
+
}, o.encoder = t(13), o.decoder = t(12), o.verifier = t(37), o.converter = t(11), o.ReflectionObject = t(22), o.Namespace = t(21), o.Root = t(26), o.Enum = t(14), o.Type = t(31), o.Field = t(15), o.OneOf = t(23), o.MapField = t(18), o.Service = t(30), o.Method = t(20), o.Message = t(19), o.wrappers = t(38), o.types = t(32), o.util = t(33), o.ReflectionObject.c(o.Root), o.Namespace.c(o.Type, o.Service, o.Enum), o.Root.c(o.Type), o.Field.c(o.Type);
|
|
605
|
+
}, { 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 17: 17, 18: 18, 19: 19, 20: 20, 21: 21, 22: 22, 23: 23, 26: 26, 30: 30, 31: 31, 32: 32, 33: 33, 37: 37, 38: 38 }], 17: [function(t, d, v) {
|
|
606
|
+
var o = v;
|
|
607
|
+
function l() {
|
|
608
|
+
o.util.c(), o.Writer.c(o.BufferWriter), o.Reader.c(o.BufferReader);
|
|
609
|
+
}
|
|
610
|
+
o.build = "minimal", o.Writer = t(39), o.BufferWriter = t(40), o.Reader = t(24), o.BufferReader = t(25), o.util = t(35), o.rpc = t(28), o.roots = t(27), o.configure = l, l();
|
|
611
|
+
}, { 24: 24, 25: 25, 27: 27, 28: 28, 35: 35, 39: 39, 40: 40 }], 18: [function(t, d, v) {
|
|
612
|
+
d.exports = f;
|
|
613
|
+
var o = t(15), l = (((f.prototype = Object.create(o.prototype)).constructor = f).className = "MapField", t(32)), c = t(33);
|
|
614
|
+
function f(r, n, a, s, u, m) {
|
|
615
|
+
if (o.call(this, r, n, s, e, e, u, m), !c.isString(a)) throw TypeError("keyType must be a string");
|
|
616
|
+
this.keyType = a, this.resolvedKeyType = null, this.map = !0;
|
|
617
|
+
}
|
|
618
|
+
f.fromJSON = function(r, n) {
|
|
619
|
+
return new f(r, n.id, n.keyType, n.type, n.options, n.comment);
|
|
620
|
+
}, f.prototype.toJSON = function(r) {
|
|
621
|
+
return r = !!r && !!r.keepComments, c.toObject(["keyType", this.keyType, "type", this.type, "id", this.id, "extend", this.extend, "options", this.options, "comment", r ? this.comment : e]);
|
|
622
|
+
}, f.prototype.resolve = function() {
|
|
623
|
+
if (this.resolved) return this;
|
|
624
|
+
if (l.mapKey[this.keyType] === e) throw Error("invalid key type: " + this.keyType);
|
|
625
|
+
return o.prototype.resolve.call(this);
|
|
626
|
+
}, f.d = function(r, n, a) {
|
|
627
|
+
return typeof a == "function" ? a = c.decorateType(a).name : a && typeof a == "object" && (a = c.decorateEnum(a).name), function(s, u) {
|
|
628
|
+
c.decorateType(s.constructor).add(new f(u, r, n, a));
|
|
629
|
+
};
|
|
630
|
+
};
|
|
631
|
+
}, { 15: 15, 32: 32, 33: 33 }], 19: [function(t, d, v) {
|
|
632
|
+
d.exports = l;
|
|
633
|
+
var o = t(35);
|
|
634
|
+
function l(c) {
|
|
635
|
+
if (c) for (var f = Object.keys(c), r = 0; r < f.length; ++r) {
|
|
636
|
+
var n = f[r];
|
|
637
|
+
n !== "__proto__" && (this[n] = c[n]);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
l.create = function(c) {
|
|
641
|
+
return this.$type.create(c);
|
|
642
|
+
}, l.encode = function(c, f) {
|
|
643
|
+
return this.$type.encode(c, f);
|
|
644
|
+
}, l.encodeDelimited = function(c, f) {
|
|
645
|
+
return this.$type.encodeDelimited(c, f);
|
|
646
|
+
}, l.decode = function(c) {
|
|
647
|
+
return this.$type.decode(c);
|
|
648
|
+
}, l.decodeDelimited = function(c) {
|
|
649
|
+
return this.$type.decodeDelimited(c);
|
|
650
|
+
}, l.verify = function(c) {
|
|
651
|
+
return this.$type.verify(c);
|
|
652
|
+
}, l.fromObject = function(c) {
|
|
653
|
+
return this.$type.fromObject(c);
|
|
654
|
+
}, l.toObject = function(c, f) {
|
|
655
|
+
return this.$type.toObject(c, f);
|
|
656
|
+
}, l.prototype.toJSON = function() {
|
|
657
|
+
return this.$type.toObject(this, o.toJSONOptions);
|
|
658
|
+
};
|
|
659
|
+
}, { 35: 35 }], 20: [function(t, d, v) {
|
|
660
|
+
d.exports = c;
|
|
661
|
+
var o = t(22), l = (((c.prototype = Object.create(o.prototype)).constructor = c).className = "Method", t(33));
|
|
662
|
+
function c(f, r, n, a, s, u, m, p, b) {
|
|
663
|
+
if (l.isObject(s) ? (m = s, s = u = e) : l.isObject(u) && (m = u, u = e), r !== e && !l.isString(r)) throw TypeError("type must be a string");
|
|
664
|
+
if (!l.isString(n)) throw TypeError("requestType must be a string");
|
|
665
|
+
if (!l.isString(a)) throw TypeError("responseType must be a string");
|
|
666
|
+
o.call(this, f, m), this.type = r || "rpc", this.requestType = n, this.requestStream = !!s || e, this.responseType = a, this.responseStream = !!u || e, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = p, this.parsedOptions = b;
|
|
667
|
+
}
|
|
668
|
+
c.fromJSON = function(f, r) {
|
|
669
|
+
return new c(f, r.type, r.requestType, r.responseType, r.requestStream, r.responseStream, r.options, r.comment, r.parsedOptions);
|
|
670
|
+
}, c.prototype.toJSON = function(f) {
|
|
671
|
+
return f = !!f && !!f.keepComments, l.toObject(["type", this.type !== "rpc" && this.type || e, "requestType", this.requestType, "requestStream", this.requestStream, "responseType", this.responseType, "responseStream", this.responseStream, "options", this.options, "comment", f ? this.comment : e, "parsedOptions", this.parsedOptions]);
|
|
672
|
+
}, c.prototype.resolve = function() {
|
|
673
|
+
return this.resolved ? this : (this.resolvedRequestType = this.parent.lookupType(this.requestType), this.resolvedResponseType = this.parent.lookupType(this.responseType), o.prototype.resolve.call(this));
|
|
674
|
+
};
|
|
675
|
+
}, { 22: 22, 33: 33 }], 21: [function(t, d, v) {
|
|
676
|
+
d.exports = u;
|
|
677
|
+
var o, l, c, f = t(22), r = (((u.prototype = Object.create(f.prototype)).constructor = u).className = "Namespace", t(15)), n = t(33), a = t(23);
|
|
678
|
+
function s(p, b) {
|
|
679
|
+
if (!p || !p.length) return e;
|
|
680
|
+
for (var h = {}, w = 0; w < p.length; ++w) h[p[w].name] = p[w].toJSON(b);
|
|
681
|
+
return h;
|
|
682
|
+
}
|
|
683
|
+
function u(p, b) {
|
|
684
|
+
f.call(this, p, b), this.nested = e, this.a = null, this.l = /* @__PURE__ */ Object.create(null), this.p = !0, this.b = !0;
|
|
685
|
+
}
|
|
686
|
+
function m(p) {
|
|
687
|
+
p.a = null, p.l = /* @__PURE__ */ Object.create(null);
|
|
688
|
+
for (var b = p; b = b.parent; ) b.l = /* @__PURE__ */ Object.create(null);
|
|
689
|
+
return p;
|
|
690
|
+
}
|
|
691
|
+
u.fromJSON = function(p, b) {
|
|
692
|
+
return new u(p, b.options).addJSON(b.nested);
|
|
693
|
+
}, u.arrayToJSON = s, u.isReservedId = function(p, b) {
|
|
694
|
+
if (p) {
|
|
695
|
+
for (var h = 0; h < p.length; ++h) if (typeof p[h] != "string" && p[h][0] <= b && p[h][1] > b) return !0;
|
|
696
|
+
}
|
|
697
|
+
return !1;
|
|
698
|
+
}, u.isReservedName = function(p, b) {
|
|
699
|
+
if (p) {
|
|
700
|
+
for (var h = 0; h < p.length; ++h) if (p[h] === b) return !0;
|
|
701
|
+
}
|
|
702
|
+
return !1;
|
|
703
|
+
}, Object.defineProperty(u.prototype, "nestedArray", { get: function() {
|
|
704
|
+
return this.a || (this.a = n.toArray(this.nested));
|
|
705
|
+
} }), u.prototype.toJSON = function(p) {
|
|
706
|
+
return n.toObject(["options", this.options, "nested", s(this.nestedArray, p)]);
|
|
707
|
+
}, u.prototype.addJSON = function(p) {
|
|
708
|
+
if (p) for (var b, h = Object.keys(p), w = 0; w < h.length; ++w) b = p[h[w]], this.add((b.fields !== e ? o : b.values !== e ? c : b.methods !== e ? l : b.id !== e ? r : u).fromJSON(h[w], b));
|
|
709
|
+
return this;
|
|
710
|
+
}, u.prototype.get = function(p) {
|
|
711
|
+
return this.nested && Object.prototype.hasOwnProperty.call(this.nested, p) ? this.nested[p] : null;
|
|
712
|
+
}, u.prototype.getEnum = function(p) {
|
|
713
|
+
if (this.nested && Object.prototype.hasOwnProperty.call(this.nested, p) && this.nested[p] instanceof c) return this.nested[p].values;
|
|
714
|
+
throw Error("no such enum: " + p);
|
|
715
|
+
}, u.prototype.add = function(p) {
|
|
716
|
+
if (!(p instanceof r && p.extend !== e || p instanceof o || p instanceof a || p instanceof c || p instanceof l || p instanceof u)) throw TypeError("object must be a valid nested object");
|
|
717
|
+
if (p.name === "__proto__") return this;
|
|
718
|
+
if (this.nested) {
|
|
719
|
+
var b = this.get(p.name);
|
|
720
|
+
if (b) {
|
|
721
|
+
if (!(b instanceof u && p instanceof u) || b instanceof o || b instanceof l) throw Error("duplicate name '" + p.name + "' in " + this);
|
|
722
|
+
for (var h = b.nestedArray, w = 0; w < h.length; ++w) p.add(h[w]);
|
|
723
|
+
this.remove(b), this.nested || (this.nested = {}), p.setOptions(b.options, !0);
|
|
724
|
+
}
|
|
725
|
+
} else this.nested = {};
|
|
726
|
+
this.nested[p.name] = p, this instanceof o || this instanceof l || this instanceof c || this instanceof r || p.e || (p.e = p.u), this.p = !0, this.b = !0;
|
|
727
|
+
for (var E = this; E = E.parent; ) E.p = !0, E.b = !0;
|
|
728
|
+
return p.onAdd(this), m(this);
|
|
729
|
+
}, u.prototype.remove = function(p) {
|
|
730
|
+
if (!(p instanceof f)) throw TypeError("object must be a ReflectionObject");
|
|
731
|
+
if (p.parent !== this) throw Error(p + " is not a member of " + this);
|
|
732
|
+
return delete this.nested[p.name], Object.keys(this.nested).length || (this.nested = e), p.onRemove(this), m(this);
|
|
733
|
+
}, u.prototype.define = function(p, b) {
|
|
734
|
+
if (n.isString(p)) p = p.split(".");
|
|
735
|
+
else if (!Array.isArray(p)) throw TypeError("illegal path");
|
|
736
|
+
if (p && p.length && p[0] === "") throw Error("path must be relative");
|
|
737
|
+
for (var h = this; 0 < p.length; ) {
|
|
738
|
+
var w = p.shift();
|
|
739
|
+
if (h.nested && h.nested[w]) {
|
|
740
|
+
if (!((h = h.nested[w]) instanceof u)) throw Error("path conflicts with non-namespace objects");
|
|
741
|
+
} else h.add(h = new u(w));
|
|
742
|
+
}
|
|
743
|
+
return b && h.addJSON(b), h;
|
|
744
|
+
}, u.prototype.resolveAll = function() {
|
|
745
|
+
if (this.b) {
|
|
746
|
+
this.v(this.e);
|
|
747
|
+
var p = this.nestedArray, b = 0;
|
|
748
|
+
for (this.resolve(); b < p.length; ) p[b] instanceof u ? p[b++].resolveAll() : p[b++].resolve();
|
|
749
|
+
this.b = !1;
|
|
750
|
+
}
|
|
751
|
+
return this;
|
|
752
|
+
}, u.prototype.v = function(p) {
|
|
753
|
+
return this.p && (this.p = !1, p = this.e || p, f.prototype.v.call(this, p), this.nestedArray.forEach((b) => {
|
|
754
|
+
b.v(p);
|
|
755
|
+
})), this;
|
|
756
|
+
}, u.prototype.lookup = function(p, b, h) {
|
|
757
|
+
if (typeof b == "boolean" ? (h = b, b = e) : b && !Array.isArray(b) && (b = [b]), n.isString(p) && p.length) {
|
|
758
|
+
if (p === ".") return this.root;
|
|
759
|
+
p = p.split(".");
|
|
760
|
+
} else if (!p.length) return this;
|
|
761
|
+
var w = p.join(".");
|
|
762
|
+
if (p[0] === "") return this.root.lookup(p.slice(1), b);
|
|
763
|
+
var E = this.root.y && this.root.y["." + w];
|
|
764
|
+
if (E && (!b || ~b.indexOf(E.constructor)) || (E = this.w(p, w)) && (!b || ~b.indexOf(E.constructor))) return E;
|
|
765
|
+
if (!h) for (var g = this; g.parent; ) {
|
|
766
|
+
if ((E = g.parent.w(p, w)) && (!b || ~b.indexOf(E.constructor))) return E;
|
|
767
|
+
g = g.parent;
|
|
768
|
+
}
|
|
769
|
+
return null;
|
|
770
|
+
}, u.prototype.w = function(p, b) {
|
|
771
|
+
if (Object.prototype.hasOwnProperty.call(this.l, b)) return this.l[b];
|
|
772
|
+
var h = this.get(p[0]), w = null;
|
|
773
|
+
if (h) p.length === 1 ? w = h : h instanceof u && (p = p.slice(1), w = h.w(p, p.join(".")));
|
|
774
|
+
else for (var E = 0; E < this.nestedArray.length; ++E) this.a[E] instanceof u && (h = this.a[E].w(p, b)) && (w = h);
|
|
775
|
+
return this.l[b] = w;
|
|
776
|
+
}, u.prototype.lookupType = function(p) {
|
|
777
|
+
var b = this.lookup(p, [o]);
|
|
778
|
+
if (b) return b;
|
|
779
|
+
throw Error("no such type: " + p);
|
|
780
|
+
}, u.prototype.lookupEnum = function(p) {
|
|
781
|
+
var b = this.lookup(p, [c]);
|
|
782
|
+
if (b) return b;
|
|
783
|
+
throw Error("no such Enum '" + p + "' in " + this);
|
|
784
|
+
}, u.prototype.lookupTypeOrEnum = function(p) {
|
|
785
|
+
var b = this.lookup(p, [o, c]);
|
|
786
|
+
if (b) return b;
|
|
787
|
+
throw Error("no such Type or Enum '" + p + "' in " + this);
|
|
788
|
+
}, u.prototype.lookupService = function(p) {
|
|
789
|
+
var b = this.lookup(p, [l]);
|
|
790
|
+
if (b) return b;
|
|
791
|
+
throw Error("no such Service '" + p + "' in " + this);
|
|
792
|
+
}, u.c = function(p, b, h) {
|
|
793
|
+
o = p, l = b, c = h;
|
|
794
|
+
};
|
|
795
|
+
}, { 15: 15, 22: 22, 23: 23, 33: 33 }], 22: [function(t, d, v) {
|
|
796
|
+
(d.exports = a).className = "ReflectionObject";
|
|
797
|
+
const o = t(23);
|
|
798
|
+
var l, c = t(33), f = { enum_type: "OPEN", field_presence: "EXPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY" }, r = { enum_type: "CLOSED", field_presence: "EXPLICIT", json_format: "LEGACY_BEST_EFFORT", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "EXPANDED", utf8_validation: "NONE" }, n = { enum_type: "OPEN", field_presence: "IMPLICIT", json_format: "ALLOW", message_encoding: "LENGTH_PREFIXED", repeated_field_encoding: "PACKED", utf8_validation: "VERIFY" };
|
|
799
|
+
function a(s, u) {
|
|
800
|
+
if (!c.isString(s)) throw TypeError("name must be a string");
|
|
801
|
+
if (u && !c.isObject(u)) throw TypeError("options must be an object");
|
|
802
|
+
this.options = u, this.parsedOptions = null, this.name = s, this.e = null, this.u = "proto2", this.o = {}, this.g = !1, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
|
|
803
|
+
}
|
|
804
|
+
Object.defineProperties(a.prototype, { root: { get: function() {
|
|
805
|
+
for (var s = this; s.parent !== null; ) s = s.parent;
|
|
806
|
+
return s;
|
|
807
|
+
} }, fullName: { get: function() {
|
|
808
|
+
for (var s = [this.name], u = this.parent; u; ) s.unshift(u.name), u = u.parent;
|
|
809
|
+
return s.join(".");
|
|
810
|
+
} } }), a.prototype.toJSON = function() {
|
|
811
|
+
throw Error();
|
|
812
|
+
}, a.prototype.onAdd = function(s) {
|
|
813
|
+
this.parent && this.parent !== s && this.parent.remove(this), this.parent = s, this.resolved = !1, s = s.root, s instanceof l && s.j(this);
|
|
814
|
+
}, a.prototype.onRemove = function(s) {
|
|
815
|
+
s = s.root, s instanceof l && s.O(this), this.parent = null, this.resolved = !1;
|
|
816
|
+
}, a.prototype.resolve = function() {
|
|
817
|
+
return this.resolved || this.root instanceof l && (this.resolved = !0), this;
|
|
818
|
+
}, a.prototype.v = function(s) {
|
|
819
|
+
return this.r(this.e || s);
|
|
820
|
+
}, a.prototype.r = function(s) {
|
|
821
|
+
if (!this.g) {
|
|
822
|
+
var u = {};
|
|
823
|
+
if (!s) throw Error("Unknown edition for " + this.fullName);
|
|
824
|
+
var m = Object.assign(this.options ? Object.assign({}, this.options.features) : {}, this.f(s));
|
|
825
|
+
if (this.e) {
|
|
826
|
+
if (s === "proto2") u = Object.assign({}, r);
|
|
827
|
+
else if (s === "proto3") u = Object.assign({}, n);
|
|
828
|
+
else {
|
|
829
|
+
if (s !== "2023") throw Error("Unknown edition: " + s);
|
|
830
|
+
u = Object.assign({}, f);
|
|
831
|
+
}
|
|
832
|
+
this.o = Object.assign(u, m || {});
|
|
833
|
+
} else {
|
|
834
|
+
if (this.partOf instanceof o)
|
|
835
|
+
s = Object.assign({}, this.partOf.o), this.o = Object.assign(s, m || {});
|
|
836
|
+
else if (!this.declaringField) {
|
|
837
|
+
if (!this.parent) throw Error("Unable to find a parent for " + this.fullName);
|
|
838
|
+
u = Object.assign({}, this.parent.o), this.o = Object.assign(u, m || {});
|
|
839
|
+
}
|
|
840
|
+
this.extensionField && (this.extensionField.o = this.o);
|
|
841
|
+
}
|
|
842
|
+
this.g = !0;
|
|
843
|
+
}
|
|
844
|
+
}, a.prototype.f = function() {
|
|
845
|
+
return {};
|
|
846
|
+
}, a.prototype.getOption = function(s) {
|
|
847
|
+
return this.options ? this.options[s] : e;
|
|
848
|
+
}, a.prototype.setOption = function(s, u, m) {
|
|
849
|
+
return s !== "__proto__" && (this.options || (this.options = {}), /^features\./.test(s) ? c.setProperty(this.options, s, u, m) : m && this.options[s] !== e || (this.getOption(s) !== u && (this.resolved = !1), this.options[s] = u)), this;
|
|
850
|
+
}, a.prototype.setParsedOption = function(s, u, m) {
|
|
851
|
+
var p, b, h;
|
|
852
|
+
return s !== "__proto__" && (this.parsedOptions || (this.parsedOptions = []), p = this.parsedOptions, m ? (b = p.find(function(w) {
|
|
853
|
+
return Object.prototype.hasOwnProperty.call(w, s);
|
|
854
|
+
})) ? (h = b[s], c.setProperty(h, m, u)) : ((b = {})[s] = c.setProperty({}, m, u), p.push(b)) : ((h = {})[s] = u, p.push(h))), this;
|
|
855
|
+
}, a.prototype.setOptions = function(s, u) {
|
|
856
|
+
if (s) for (var m = Object.keys(s), p = 0; p < m.length; ++p) this.setOption(m[p], s[m[p]], u);
|
|
857
|
+
return this;
|
|
858
|
+
}, a.prototype.toString = function() {
|
|
859
|
+
var s = this.constructor.className, u = this.fullName;
|
|
860
|
+
return u.length ? s + " " + u : s;
|
|
861
|
+
}, a.prototype.h = function() {
|
|
862
|
+
return this.e && this.e !== "proto3" ? this.e : e;
|
|
863
|
+
}, a.c = function(s) {
|
|
864
|
+
l = s;
|
|
865
|
+
};
|
|
866
|
+
}, { 23: 23, 33: 33 }], 23: [function(t, d, v) {
|
|
867
|
+
d.exports = f;
|
|
868
|
+
var o = t(22), l = (((f.prototype = Object.create(o.prototype)).constructor = f).className = "OneOf", t(15)), c = t(33);
|
|
869
|
+
function f(n, a, s, u) {
|
|
870
|
+
if (Array.isArray(a) || (s = a, a = e), o.call(this, n, s), a !== e && !Array.isArray(a)) throw TypeError("fieldNames must be an Array");
|
|
871
|
+
this.oneof = a || [], this.fieldsArray = [], this.comment = u;
|
|
872
|
+
}
|
|
873
|
+
function r(n) {
|
|
874
|
+
if (n.parent) for (var a = 0; a < n.fieldsArray.length; ++a) n.fieldsArray[a].parent || n.parent.add(n.fieldsArray[a]);
|
|
875
|
+
}
|
|
876
|
+
f.fromJSON = function(n, a) {
|
|
877
|
+
return new f(n, a.oneof, a.options, a.comment);
|
|
878
|
+
}, f.prototype.toJSON = function(n) {
|
|
879
|
+
return n = !!n && !!n.keepComments, c.toObject(["options", this.options, "oneof", this.oneof, "comment", n ? this.comment : e]);
|
|
880
|
+
}, f.prototype.add = function(n) {
|
|
881
|
+
if (n instanceof l) return n.parent && n.parent !== this.parent && n.parent.remove(n), this.oneof.push(n.name), this.fieldsArray.push(n), r(n.partOf = this), this;
|
|
882
|
+
throw TypeError("field must be a Field");
|
|
883
|
+
}, f.prototype.remove = function(n) {
|
|
884
|
+
if (!(n instanceof l)) throw TypeError("field must be a Field");
|
|
885
|
+
var a = this.fieldsArray.indexOf(n);
|
|
886
|
+
if (a < 0) throw Error(n + " is not a member of " + this);
|
|
887
|
+
return this.fieldsArray.splice(a, 1), -1 < (a = this.oneof.indexOf(n.name)) && this.oneof.splice(a, 1), n.partOf = null, this;
|
|
888
|
+
}, f.prototype.onAdd = function(n) {
|
|
889
|
+
o.prototype.onAdd.call(this, n);
|
|
890
|
+
for (var a = 0; a < this.oneof.length; ++a) {
|
|
891
|
+
var s = n.get(this.oneof[a]);
|
|
892
|
+
s && !s.partOf && (s.partOf = this).fieldsArray.push(s);
|
|
893
|
+
}
|
|
894
|
+
r(this);
|
|
895
|
+
}, f.prototype.onRemove = function(n) {
|
|
896
|
+
for (var a, s = 0; s < this.fieldsArray.length; ++s) (a = this.fieldsArray[s]).parent && a.parent.remove(a);
|
|
897
|
+
o.prototype.onRemove.call(this, n);
|
|
898
|
+
}, Object.defineProperty(f.prototype, "isProto3Optional", { get: function() {
|
|
899
|
+
var n;
|
|
900
|
+
return this.fieldsArray != null && this.fieldsArray.length === 1 && (n = this.fieldsArray[0]).options != null && n.options.proto3_optional === !0;
|
|
901
|
+
} }), f.d = function() {
|
|
902
|
+
for (var n = Array(arguments.length), a = 0; a < arguments.length; ) n[a] = arguments[a++];
|
|
903
|
+
return function(s, u) {
|
|
904
|
+
c.decorateType(s.constructor).add(new f(u, n)), Object.defineProperty(s, u, { get: c.oneOfGetter(n), set: c.oneOfSetter(n) });
|
|
905
|
+
};
|
|
906
|
+
};
|
|
907
|
+
}, { 15: 15, 22: 22, 33: 33 }], 24: [function(t, d, v) {
|
|
908
|
+
d.exports = n;
|
|
909
|
+
var o, l = t(35), c = l.LongBits, f = l.utf8;
|
|
910
|
+
function r(h, w) {
|
|
911
|
+
return RangeError("index out of range: " + h.pos + " + " + (w || 1) + " > " + h.len);
|
|
912
|
+
}
|
|
913
|
+
function n(h) {
|
|
914
|
+
this.buf = h, this.pos = 0, this.len = h.length;
|
|
915
|
+
}
|
|
916
|
+
function a() {
|
|
917
|
+
return l.Buffer ? function(h) {
|
|
918
|
+
return (n.create = function(w) {
|
|
919
|
+
return l.Buffer.isBuffer(w) ? new o(w) : u(w);
|
|
920
|
+
})(h);
|
|
921
|
+
} : u;
|
|
922
|
+
}
|
|
923
|
+
var s, u = typeof Uint8Array != "undefined" ? function(h) {
|
|
924
|
+
if (h instanceof Uint8Array || Array.isArray(h)) return new n(h);
|
|
925
|
+
throw Error("illegal buffer");
|
|
926
|
+
} : function(h) {
|
|
927
|
+
if (Array.isArray(h)) return new n(h);
|
|
928
|
+
throw Error("illegal buffer");
|
|
929
|
+
};
|
|
930
|
+
function m() {
|
|
931
|
+
var h = new c(0, 0), w = 0;
|
|
932
|
+
if (!(4 < this.len - this.pos)) {
|
|
933
|
+
for (; w < 3; ++w) {
|
|
934
|
+
if (this.pos >= this.len) throw r(this);
|
|
935
|
+
if (h.lo = (h.lo | (127 & this.buf[this.pos]) << 7 * w) >>> 0, this.buf[this.pos++] < 128) return h;
|
|
936
|
+
}
|
|
937
|
+
return h.lo = (h.lo | (127 & this.buf[this.pos++]) << 7 * w) >>> 0, h;
|
|
938
|
+
}
|
|
939
|
+
for (; w < 4; ++w) if (h.lo = (h.lo | (127 & this.buf[this.pos]) << 7 * w) >>> 0, this.buf[this.pos++] < 128) return h;
|
|
940
|
+
if (h.lo = (h.lo | (127 & this.buf[this.pos]) << 28) >>> 0, h.hi = (h.hi | (127 & this.buf[this.pos]) >> 4) >>> 0, this.buf[this.pos++] < 128) return h;
|
|
941
|
+
if (w = 0, 4 < this.len - this.pos) {
|
|
942
|
+
for (; w < 5; ++w) if (h.hi = (h.hi | (127 & this.buf[this.pos]) << 7 * w + 3) >>> 0, this.buf[this.pos++] < 128) return h;
|
|
943
|
+
} else for (; w < 5; ++w) {
|
|
944
|
+
if (this.pos >= this.len) throw r(this);
|
|
945
|
+
if (h.hi = (h.hi | (127 & this.buf[this.pos]) << 7 * w + 3) >>> 0, this.buf[this.pos++] < 128) return h;
|
|
946
|
+
}
|
|
947
|
+
throw Error("invalid varint encoding");
|
|
948
|
+
}
|
|
949
|
+
function p(h, w) {
|
|
950
|
+
return (h[w - 4] | h[w - 3] << 8 | h[w - 2] << 16 | h[w - 1] << 24) >>> 0;
|
|
951
|
+
}
|
|
952
|
+
function b() {
|
|
953
|
+
if (this.pos + 8 > this.len) throw r(this, 8);
|
|
954
|
+
return new c(p(this.buf, this.pos += 4), p(this.buf, this.pos += 4));
|
|
955
|
+
}
|
|
956
|
+
n.create = a(), n.prototype.k = l.Array.prototype.subarray || l.Array.prototype.slice, n.prototype.uint32 = (s = 4294967295, function() {
|
|
957
|
+
if (s = (127 & this.buf[this.pos]) >>> 0, this.buf[this.pos++] < 128 || (s = (s | (127 & this.buf[this.pos]) << 7) >>> 0, this.buf[this.pos++] < 128 || (s = (s | (127 & this.buf[this.pos]) << 14) >>> 0, this.buf[this.pos++] < 128 || (s = (s | (127 & this.buf[this.pos]) << 21) >>> 0, this.buf[this.pos++] < 128 || (s = (s | (15 & this.buf[this.pos]) << 28) >>> 0, this.buf[this.pos++] < 128 || !((this.pos += 5) > this.len)))))) return s;
|
|
958
|
+
throw this.pos = this.len, r(this, 10);
|
|
959
|
+
}), n.prototype.int32 = function() {
|
|
960
|
+
return 0 | this.uint32();
|
|
961
|
+
}, n.prototype.sint32 = function() {
|
|
962
|
+
var h = this.uint32();
|
|
963
|
+
return h >>> 1 ^ -(1 & h) | 0;
|
|
964
|
+
}, n.prototype.bool = function() {
|
|
965
|
+
return this.uint32() !== 0;
|
|
966
|
+
}, n.prototype.fixed32 = function() {
|
|
967
|
+
if (this.pos + 4 > this.len) throw r(this, 4);
|
|
968
|
+
return p(this.buf, this.pos += 4);
|
|
969
|
+
}, n.prototype.sfixed32 = function() {
|
|
970
|
+
if (this.pos + 4 > this.len) throw r(this, 4);
|
|
971
|
+
return 0 | p(this.buf, this.pos += 4);
|
|
972
|
+
}, n.prototype.float = function() {
|
|
973
|
+
if (this.pos + 4 > this.len) throw r(this, 4);
|
|
974
|
+
var h = l.float.readFloatLE(this.buf, this.pos);
|
|
975
|
+
return this.pos += 4, h;
|
|
976
|
+
}, n.prototype.double = function() {
|
|
977
|
+
if (this.pos + 8 > this.len) throw r(this, 4);
|
|
978
|
+
var h = l.float.readDoubleLE(this.buf, this.pos);
|
|
979
|
+
return this.pos += 8, h;
|
|
980
|
+
}, n.prototype.bytes = function() {
|
|
981
|
+
var h = this.uint32(), w = this.pos, E = this.pos + h;
|
|
982
|
+
if (E > this.len) throw r(this, h);
|
|
983
|
+
return this.pos += h, Array.isArray(this.buf) ? this.buf.slice(w, E) : w === E ? (h = l.Buffer) ? h.alloc(0) : new this.buf.constructor(0) : this.k.call(this.buf, w, E);
|
|
984
|
+
}, n.prototype.string = function() {
|
|
985
|
+
var h = this.bytes();
|
|
986
|
+
return f.read(h, 0, h.length);
|
|
987
|
+
}, n.prototype.skip = function(h) {
|
|
988
|
+
if (typeof h == "number") {
|
|
989
|
+
if (this.pos + h > this.len) throw r(this, h);
|
|
990
|
+
this.pos += h;
|
|
991
|
+
} else do
|
|
992
|
+
if (this.pos >= this.len) throw r(this);
|
|
993
|
+
while (128 & this.buf[this.pos++]);
|
|
994
|
+
return this;
|
|
995
|
+
}, n.recursionLimit = l.recursionLimit, n.prototype.skipType = function(h, w) {
|
|
996
|
+
if (n.recursionLimit < (w = w === e ? 0 : w)) throw Error("maximum nesting depth exceeded");
|
|
997
|
+
switch (h) {
|
|
998
|
+
case 0:
|
|
999
|
+
this.skip();
|
|
1000
|
+
break;
|
|
1001
|
+
case 1:
|
|
1002
|
+
this.skip(8);
|
|
1003
|
+
break;
|
|
1004
|
+
case 2:
|
|
1005
|
+
this.skip(this.uint32());
|
|
1006
|
+
break;
|
|
1007
|
+
case 3:
|
|
1008
|
+
for (; (h = 7 & this.uint32()) != 4; ) this.skipType(h, w + 1);
|
|
1009
|
+
break;
|
|
1010
|
+
case 5:
|
|
1011
|
+
this.skip(4);
|
|
1012
|
+
break;
|
|
1013
|
+
default:
|
|
1014
|
+
throw Error("invalid wire type " + h + " at offset " + this.pos);
|
|
1015
|
+
}
|
|
1016
|
+
return this;
|
|
1017
|
+
}, n.c = function(h) {
|
|
1018
|
+
o = h, n.create = a(), o.c();
|
|
1019
|
+
var w = l.Long ? "toLong" : "toNumber";
|
|
1020
|
+
l.merge(n.prototype, { int64: function() {
|
|
1021
|
+
return m.call(this)[w](!1);
|
|
1022
|
+
}, uint64: function() {
|
|
1023
|
+
return m.call(this)[w](!0);
|
|
1024
|
+
}, sint64: function() {
|
|
1025
|
+
return m.call(this).zzDecode()[w](!1);
|
|
1026
|
+
}, fixed64: function() {
|
|
1027
|
+
return b.call(this)[w](!0);
|
|
1028
|
+
}, sfixed64: function() {
|
|
1029
|
+
return b.call(this)[w](!1);
|
|
1030
|
+
} });
|
|
1031
|
+
};
|
|
1032
|
+
}, { 35: 35 }], 25: [function(t, d, v) {
|
|
1033
|
+
d.exports = c;
|
|
1034
|
+
var o = t(24), l = ((c.prototype = Object.create(o.prototype)).constructor = c, t(35));
|
|
1035
|
+
function c(f) {
|
|
1036
|
+
o.call(this, f);
|
|
1037
|
+
}
|
|
1038
|
+
c.c = function() {
|
|
1039
|
+
l.Buffer && (c.prototype.k = l.Buffer.prototype.slice);
|
|
1040
|
+
}, c.prototype.string = function() {
|
|
1041
|
+
var f = this.uint32();
|
|
1042
|
+
return this.buf.utf8Slice ? this.buf.utf8Slice(this.pos, this.pos = Math.min(this.pos + f, this.len)) : this.buf.toString("utf-8", this.pos, this.pos = Math.min(this.pos + f, this.len));
|
|
1043
|
+
}, c.c();
|
|
1044
|
+
}, { 24: 24, 35: 35 }], 26: [function(t, d, v) {
|
|
1045
|
+
d.exports = u;
|
|
1046
|
+
var o, l, c, f = t(21), r = (((u.prototype = Object.create(f.prototype)).constructor = u).className = "Root", t(15)), n = t(14), a = t(23), s = t(33);
|
|
1047
|
+
function u(h) {
|
|
1048
|
+
f.call(this, "", h), this.deferred = [], this.files = [], this.e = "proto2", this.y = {};
|
|
1049
|
+
}
|
|
1050
|
+
function m() {
|
|
1051
|
+
}
|
|
1052
|
+
u.fromJSON = function(h, w) {
|
|
1053
|
+
return w = w || new u(), h.options && w.setOptions(h.options), w.addJSON(h.nested).resolveAll();
|
|
1054
|
+
}, u.prototype.resolvePath = s.path.resolve, u.prototype.fetch = s.fetch, u.prototype.load = function h(w, E, g) {
|
|
1055
|
+
typeof E == "function" && (g = E, E = e);
|
|
1056
|
+
var j = this;
|
|
1057
|
+
if (!g) return s.asPromise(h, j, w, E);
|
|
1058
|
+
var _ = g === m;
|
|
1059
|
+
function O(A, S) {
|
|
1060
|
+
if (g) {
|
|
1061
|
+
if (_) throw A;
|
|
1062
|
+
S && S.resolveAll();
|
|
1063
|
+
var C = g;
|
|
1064
|
+
g = null, C(A, S);
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
function x(A) {
|
|
1068
|
+
var S = A.lastIndexOf("google/protobuf/");
|
|
1069
|
+
return -1 < S && (A = A.substring(S), A in c) ? A : null;
|
|
1070
|
+
}
|
|
1071
|
+
function N(A, S) {
|
|
1072
|
+
try {
|
|
1073
|
+
if (s.isString(S) && (S[0] || "") == "{" && (S = JSON.parse(S)), s.isString(S)) {
|
|
1074
|
+
l.filename = A;
|
|
1075
|
+
var C, I = l(S, j, E), B = 0;
|
|
1076
|
+
if (I.imports) for (; B < I.imports.length; ++B) (C = x(I.imports[B]) || j.resolvePath(A, I.imports[B])) && L(C);
|
|
1077
|
+
if (I.weakImports) for (B = 0; B < I.weakImports.length; ++B) (C = x(I.weakImports[B]) || j.resolvePath(A, I.weakImports[B])) && L(C, !0);
|
|
1078
|
+
} else j.setOptions(S.options).addJSON(S.nested);
|
|
1079
|
+
} catch (W) {
|
|
1080
|
+
O(W);
|
|
1081
|
+
}
|
|
1082
|
+
_ || M || O(null, j);
|
|
1083
|
+
}
|
|
1084
|
+
function L(A, S) {
|
|
1085
|
+
if (A = x(A) || A, !~j.files.indexOf(A)) if (j.files.push(A), A in c) _ ? N(A, c[A]) : (++M, setTimeout(function() {
|
|
1086
|
+
--M, N(A, c[A]);
|
|
1087
|
+
}));
|
|
1088
|
+
else if (_) {
|
|
1089
|
+
var C;
|
|
1090
|
+
try {
|
|
1091
|
+
C = s.fs.readFileSync(A).toString("utf8");
|
|
1092
|
+
} catch (I) {
|
|
1093
|
+
return void (S || O(I));
|
|
1094
|
+
}
|
|
1095
|
+
N(A, C);
|
|
1096
|
+
} else ++M, j.fetch(A, function(I, B) {
|
|
1097
|
+
--M, g && (I ? S ? M || O(null, j) : O(I) : N(A, B));
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
var M = 0;
|
|
1101
|
+
s.isString(w) && (w = [w]);
|
|
1102
|
+
for (var T, k = 0; k < w.length; ++k) (T = j.resolvePath("", w[k])) && L(T);
|
|
1103
|
+
return _ ? j.resolveAll() : M || O(null, j), j;
|
|
1104
|
+
}, u.prototype.loadSync = function(h, w) {
|
|
1105
|
+
if (s.isNode) return this.load(h, w, m);
|
|
1106
|
+
throw Error("not supported");
|
|
1107
|
+
}, u.prototype.resolveAll = function() {
|
|
1108
|
+
if (!this.b) return this;
|
|
1109
|
+
if (this.deferred.length) throw Error("unresolvable extensions: " + this.deferred.map(function(h) {
|
|
1110
|
+
return "'extend " + h.extend + "' in " + h.parent.fullName;
|
|
1111
|
+
}).join(", "));
|
|
1112
|
+
return f.prototype.resolveAll.call(this);
|
|
1113
|
+
};
|
|
1114
|
+
var p = /^[A-Z]/;
|
|
1115
|
+
function b(h, w) {
|
|
1116
|
+
var E, g = w.parent.lookup(w.extend);
|
|
1117
|
+
if (g) return E = new r(w.fullName, w.id, w.type, w.rule, e, w.options), g.get(E.name) || ((E.declaringField = w).extensionField = E, g.add(E)), 1;
|
|
1118
|
+
}
|
|
1119
|
+
u.prototype.j = function(h) {
|
|
1120
|
+
if (h instanceof r) h.extend === e || h.extensionField || b(0, h) || this.deferred.push(h);
|
|
1121
|
+
else if (h instanceof n) p.test(h.name) && (h.parent[h.name] = h.values);
|
|
1122
|
+
else if (!(h instanceof a)) {
|
|
1123
|
+
if (h instanceof o) for (var w = 0; w < this.deferred.length; ) b(0, this.deferred[w]) ? this.deferred.splice(w, 1) : ++w;
|
|
1124
|
+
for (var E = 0; E < h.nestedArray.length; ++E) this.j(h.a[E]);
|
|
1125
|
+
p.test(h.name) && (h.parent[h.name] = h);
|
|
1126
|
+
}
|
|
1127
|
+
(h instanceof o || h instanceof n || h instanceof r) && (this.y[h.fullName] = h);
|
|
1128
|
+
}, u.prototype.O = function(h) {
|
|
1129
|
+
var w;
|
|
1130
|
+
if (h instanceof r) h.extend !== e && (h.extensionField ? (h.extensionField.parent.remove(h.extensionField), h.extensionField = null) : -1 < (w = this.deferred.indexOf(h)) && this.deferred.splice(w, 1));
|
|
1131
|
+
else if (h instanceof n) p.test(h.name) && delete h.parent[h.name];
|
|
1132
|
+
else if (h instanceof f) {
|
|
1133
|
+
for (var E = 0; E < h.nestedArray.length; ++E) this.O(h.a[E]);
|
|
1134
|
+
p.test(h.name) && delete h.parent[h.name];
|
|
1135
|
+
}
|
|
1136
|
+
delete this.y[h.fullName];
|
|
1137
|
+
}, u.c = function(h, w, E) {
|
|
1138
|
+
o = h, l = w, c = E;
|
|
1139
|
+
};
|
|
1140
|
+
}, { 14: 14, 15: 15, 21: 21, 23: 23, 33: 33 }], 27: [function(t, d, v) {
|
|
1141
|
+
d.exports = {};
|
|
1142
|
+
}, {}], 28: [function(t, d, v) {
|
|
1143
|
+
v.Service = t(29);
|
|
1144
|
+
}, { 29: 29 }], 29: [function(t, d, v) {
|
|
1145
|
+
d.exports = l;
|
|
1146
|
+
var o = t(35);
|
|
1147
|
+
function l(c, f, r) {
|
|
1148
|
+
if (typeof c != "function") throw TypeError("rpcImpl must be a function");
|
|
1149
|
+
o.EventEmitter.call(this), this.rpcImpl = c, this.requestDelimited = !!f, this.responseDelimited = !!r;
|
|
1150
|
+
}
|
|
1151
|
+
((l.prototype = Object.create(o.EventEmitter.prototype)).constructor = l).prototype.rpcCall = function c(f, r, n, a, s) {
|
|
1152
|
+
if (!a) throw TypeError("request must be specified");
|
|
1153
|
+
var u = this;
|
|
1154
|
+
if (!s) return o.asPromise(c, u, f, r, n, a);
|
|
1155
|
+
if (!u.rpcImpl) return setTimeout(function() {
|
|
1156
|
+
s(Error("already ended"));
|
|
1157
|
+
}, 0), e;
|
|
1158
|
+
try {
|
|
1159
|
+
return u.rpcImpl(f, r[u.requestDelimited ? "encodeDelimited" : "encode"](a).finish(), function(m, p) {
|
|
1160
|
+
if (m) return u.emit("error", m, f), s(m);
|
|
1161
|
+
if (p === null) return u.end(!0), e;
|
|
1162
|
+
if (!(p instanceof n)) try {
|
|
1163
|
+
p = n[u.responseDelimited ? "decodeDelimited" : "decode"](p);
|
|
1164
|
+
} catch (b) {
|
|
1165
|
+
return u.emit("error", b, f), s(b);
|
|
1166
|
+
}
|
|
1167
|
+
return u.emit("data", p, f), s(null, p);
|
|
1168
|
+
});
|
|
1169
|
+
} catch (m) {
|
|
1170
|
+
return u.emit("error", m, f), setTimeout(function() {
|
|
1171
|
+
s(m);
|
|
1172
|
+
}, 0), e;
|
|
1173
|
+
}
|
|
1174
|
+
}, l.prototype.end = function(c) {
|
|
1175
|
+
return this.rpcImpl && (c || this.rpcImpl(null, null, null), this.rpcImpl = null, this.emit("end").off()), this;
|
|
1176
|
+
};
|
|
1177
|
+
}, { 35: 35 }], 30: [function(t, d, v) {
|
|
1178
|
+
d.exports = n;
|
|
1179
|
+
var o = t(21), l = (((n.prototype = Object.create(o.prototype)).constructor = n).className = "Service", t(20)), c = t(33), f = t(28), r = c.patterns.reservedRe;
|
|
1180
|
+
function n(s, u) {
|
|
1181
|
+
o.call(this, s, u), this.methods = {}, this._ = null;
|
|
1182
|
+
}
|
|
1183
|
+
function a(s) {
|
|
1184
|
+
return s._ = null, s;
|
|
1185
|
+
}
|
|
1186
|
+
n.fromJSON = function(s, u) {
|
|
1187
|
+
var m = new n(s, u.options);
|
|
1188
|
+
if (u.methods) for (var p = Object.keys(u.methods), b = 0; b < p.length; ++b) m.add(l.fromJSON(p[b], u.methods[p[b]]));
|
|
1189
|
+
return u.nested && m.addJSON(u.nested), u.edition && (m.e = u.edition), m.comment = u.comment, m.u = "proto3", m;
|
|
1190
|
+
}, n.prototype.toJSON = function(s) {
|
|
1191
|
+
var u = o.prototype.toJSON.call(this, s), m = !!s && !!s.keepComments;
|
|
1192
|
+
return c.toObject(["edition", this.h(), "options", u && u.options || e, "methods", o.arrayToJSON(this.methodsArray, s) || {}, "nested", u && u.nested || e, "comment", m ? this.comment : e]);
|
|
1193
|
+
}, Object.defineProperty(n.prototype, "methodsArray", { get: function() {
|
|
1194
|
+
return this._ || (this._ = c.toArray(this.methods));
|
|
1195
|
+
} }), n.prototype.get = function(s) {
|
|
1196
|
+
return Object.prototype.hasOwnProperty.call(this.methods, s) ? this.methods[s] : o.prototype.get.call(this, s);
|
|
1197
|
+
}, n.prototype.resolveAll = function() {
|
|
1198
|
+
if (this.b) {
|
|
1199
|
+
o.prototype.resolve.call(this);
|
|
1200
|
+
for (var s = this.methodsArray, u = 0; u < s.length; ++u) s[u].resolve();
|
|
1201
|
+
}
|
|
1202
|
+
return this;
|
|
1203
|
+
}, n.prototype.v = function(s) {
|
|
1204
|
+
return this.p && (s = this.e || s, o.prototype.v.call(this, s), this.methodsArray.forEach((u) => {
|
|
1205
|
+
u.v(s);
|
|
1206
|
+
})), this;
|
|
1207
|
+
}, n.prototype.add = function(s) {
|
|
1208
|
+
if (this.get(s.name)) throw Error("duplicate name '" + s.name + "' in " + this);
|
|
1209
|
+
return s instanceof l ? s.name === "__proto__" ? this : a((this.methods[s.name] = s).parent = this) : o.prototype.add.call(this, s);
|
|
1210
|
+
}, n.prototype.remove = function(s) {
|
|
1211
|
+
if (s instanceof l) {
|
|
1212
|
+
if (this.methods[s.name] !== s) throw Error(s + " is not a member of " + this);
|
|
1213
|
+
return delete this.methods[s.name], s.parent = null, a(this);
|
|
1214
|
+
}
|
|
1215
|
+
return o.prototype.remove.call(this, s);
|
|
1216
|
+
}, n.prototype.create = function(s, u, m) {
|
|
1217
|
+
for (var p, b = new f.Service(s, u, m), h = 0; h < this.methodsArray.length; ++h) {
|
|
1218
|
+
var w = c.lcFirst((p = this._[h]).resolve().name).replace(/[^$\w_]/g, "");
|
|
1219
|
+
b[w] = c.codegen(["r", "c"], r.test(w) ? w + "_" : w)("return this.rpcCall(m,q,s,r,c)")({ m: p, q: p.resolvedRequestType.ctor, s: p.resolvedResponseType.ctor });
|
|
1220
|
+
}
|
|
1221
|
+
return b;
|
|
1222
|
+
};
|
|
1223
|
+
}, { 20: 20, 21: 21, 28: 28, 33: 33 }], 31: [function(t, d, v) {
|
|
1224
|
+
d.exports = g;
|
|
1225
|
+
var o = t(21), l = (((g.prototype = Object.create(o.prototype)).constructor = g).className = "Type", t(14)), c = t(23), f = t(15), r = t(18), n = t(30), a = t(19), s = t(24), u = t(39), m = t(33), p = t(13), b = t(12), h = t(37), w = t(11), E = t(38);
|
|
1226
|
+
function g(_, O) {
|
|
1227
|
+
_ = _.replace(/\W/g, ""), o.call(this, _, O), this.fields = {}, this.oneofs = e, this.extensions = e, this.reserved = e, this.group = e, this.A = null, this.i = null, this.T = null, this.x = null;
|
|
1228
|
+
}
|
|
1229
|
+
function j(_) {
|
|
1230
|
+
return _.A = _.i = _.T = null, delete _.encode, delete _.decode, delete _.verify, _;
|
|
1231
|
+
}
|
|
1232
|
+
Object.defineProperties(g.prototype, { fieldsById: { get: function() {
|
|
1233
|
+
if (!this.A) {
|
|
1234
|
+
this.A = {};
|
|
1235
|
+
for (var _ = Object.keys(this.fields), O = 0; O < _.length; ++O) {
|
|
1236
|
+
var x = this.fields[_[O]], N = x.id;
|
|
1237
|
+
if (this.A[N]) throw Error("duplicate id " + N + " in " + this);
|
|
1238
|
+
this.A[N] = x;
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
return this.A;
|
|
1242
|
+
} }, fieldsArray: { get: function() {
|
|
1243
|
+
return this.i || (this.i = m.toArray(this.fields));
|
|
1244
|
+
} }, oneofsArray: { get: function() {
|
|
1245
|
+
return this.T || (this.T = m.toArray(this.oneofs));
|
|
1246
|
+
} }, ctor: { get: function() {
|
|
1247
|
+
return this.x || (this.ctor = g.generateConstructor(this)());
|
|
1248
|
+
}, set: function(_) {
|
|
1249
|
+
for (var O = _.prototype, x = (O instanceof a || ((_.prototype = new a()).constructor = _, m.merge(_.prototype, O)), _.$type = _.prototype.$type = this, m.merge(_, a, !0), this.x = _, 0); x < this.fieldsArray.length; ++x) this.i[x].resolve();
|
|
1250
|
+
for (var N = {}, x = 0; x < this.oneofsArray.length; ++x) N[this.T[x].resolve().name] = { get: m.oneOfGetter(this.T[x].oneof), set: m.oneOfSetter(this.T[x].oneof) };
|
|
1251
|
+
x && Object.defineProperties(_.prototype, N);
|
|
1252
|
+
} } }), g.generateConstructor = function(_) {
|
|
1253
|
+
for (var O, x = m.codegen(["p"], _.name), N = 0; N < _.fieldsArray.length; ++N) (O = _.i[N]).map ? x("this%s={}", m.safeProp(O.name)) : O.repeated && x("this%s=[]", m.safeProp(O.name));
|
|
1254
|
+
return x('if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null&&ks[i]!=="__proto__")')("this[ks[i]]=p[ks[i]]");
|
|
1255
|
+
}, g.fromJSON = function(_, O) {
|
|
1256
|
+
for (var x = new g(_, O.options), N = (x.extensions = O.extensions, x.reserved = O.reserved, Object.keys(O.fields)), L = 0; L < N.length; ++L) x.add((O.fields[N[L]].keyType !== void 0 ? r : f).fromJSON(N[L], O.fields[N[L]]));
|
|
1257
|
+
if (O.oneofs) for (N = Object.keys(O.oneofs), L = 0; L < N.length; ++L) x.add(c.fromJSON(N[L], O.oneofs[N[L]]));
|
|
1258
|
+
if (O.nested) for (N = Object.keys(O.nested), L = 0; L < N.length; ++L) {
|
|
1259
|
+
var M = O.nested[N[L]];
|
|
1260
|
+
x.add((M.id !== e ? f : M.fields !== e ? g : M.values !== e ? l : M.methods !== e ? n : o).fromJSON(N[L], M));
|
|
1261
|
+
}
|
|
1262
|
+
return O.extensions && O.extensions.length && (x.extensions = O.extensions), O.reserved && O.reserved.length && (x.reserved = O.reserved), O.group && (x.group = !0), O.comment && (x.comment = O.comment), O.edition && (x.e = O.edition), x.u = "proto3", x;
|
|
1263
|
+
}, g.prototype.toJSON = function(_) {
|
|
1264
|
+
var O = o.prototype.toJSON.call(this, _), x = !!_ && !!_.keepComments;
|
|
1265
|
+
return m.toObject(["edition", this.h(), "options", O && O.options || e, "oneofs", o.arrayToJSON(this.oneofsArray, _), "fields", o.arrayToJSON(this.fieldsArray.filter(function(N) {
|
|
1266
|
+
return !N.declaringField;
|
|
1267
|
+
}), _) || {}, "extensions", this.extensions && this.extensions.length ? this.extensions : e, "reserved", this.reserved && this.reserved.length ? this.reserved : e, "group", this.group || e, "nested", O && O.nested || e, "comment", x ? this.comment : e]);
|
|
1268
|
+
}, g.prototype.resolveAll = function() {
|
|
1269
|
+
if (this.b) {
|
|
1270
|
+
o.prototype.resolveAll.call(this);
|
|
1271
|
+
for (var _ = this.oneofsArray, O = 0; O < _.length; ) _[O++].resolve();
|
|
1272
|
+
for (var x = this.fieldsArray, O = 0; O < x.length; ) x[O++].resolve();
|
|
1273
|
+
}
|
|
1274
|
+
return this;
|
|
1275
|
+
}, g.prototype.v = function(_) {
|
|
1276
|
+
return this.p && (_ = this.e || _, o.prototype.v.call(this, _), this.oneofsArray.forEach((O) => {
|
|
1277
|
+
O.r(_);
|
|
1278
|
+
}), this.fieldsArray.forEach((O) => {
|
|
1279
|
+
O.r(_);
|
|
1280
|
+
})), this;
|
|
1281
|
+
}, g.prototype.get = function(_) {
|
|
1282
|
+
return Object.prototype.hasOwnProperty.call(this.fields, _) ? this.fields[_] : this.oneofs && Object.prototype.hasOwnProperty.call(this.oneofs, _) ? this.oneofs[_] : this.nested && Object.prototype.hasOwnProperty.call(this.nested, _) ? this.nested[_] : null;
|
|
1283
|
+
}, g.prototype.add = function(_) {
|
|
1284
|
+
if (this.get(_.name)) throw Error("duplicate name '" + _.name + "' in " + this);
|
|
1285
|
+
if (_ instanceof f && _.extend === e) {
|
|
1286
|
+
if ((this.A || this.fieldsById)[_.id]) throw Error("duplicate id " + _.id + " in " + this);
|
|
1287
|
+
if (this.isReservedId(_.id)) throw Error("id " + _.id + " is reserved in " + this);
|
|
1288
|
+
if (this.isReservedName(_.name)) throw Error("name '" + _.name + "' is reserved in " + this);
|
|
1289
|
+
return _.name === "__proto__" ? this : (_.parent && _.parent.remove(_), (this.fields[_.name] = _).message = this, _.onAdd(this), j(this));
|
|
1290
|
+
}
|
|
1291
|
+
return _ instanceof c ? _.name === "__proto__" ? this : (this.oneofs || (this.oneofs = {}), (this.oneofs[_.name] = _).onAdd(this), j(this)) : o.prototype.add.call(this, _);
|
|
1292
|
+
}, g.prototype.remove = function(_) {
|
|
1293
|
+
if (_ instanceof f && _.extend === e) {
|
|
1294
|
+
if (this.fields && this.fields[_.name] === _) return delete this.fields[_.name], _.parent = null, _.onRemove(this), j(this);
|
|
1295
|
+
throw Error(_ + " is not a member of " + this);
|
|
1296
|
+
}
|
|
1297
|
+
if (_ instanceof c) {
|
|
1298
|
+
if (this.oneofs && this.oneofs[_.name] === _) return delete this.oneofs[_.name], _.parent = null, _.onRemove(this), j(this);
|
|
1299
|
+
throw Error(_ + " is not a member of " + this);
|
|
1300
|
+
}
|
|
1301
|
+
return o.prototype.remove.call(this, _);
|
|
1302
|
+
}, g.prototype.isReservedId = function(_) {
|
|
1303
|
+
return o.isReservedId(this.reserved, _);
|
|
1304
|
+
}, g.prototype.isReservedName = function(_) {
|
|
1305
|
+
return o.isReservedName(this.reserved, _);
|
|
1306
|
+
}, g.prototype.create = function(_) {
|
|
1307
|
+
return new this.ctor(_);
|
|
1308
|
+
}, g.prototype.setup = function() {
|
|
1309
|
+
for (var N = this.fullName, _ = [], O = 0; O < this.fieldsArray.length; ++O) _.push(this.i[O].resolve().resolvedType);
|
|
1310
|
+
this.encode = p(this)({ Writer: u, types: _, util: m }), this.decode = b(this)({ Reader: s, types: _, util: m }), this.verify = h(this)({ types: _, util: m }), this.fromObject = w.fromObject(this)({ types: _, util: m }), this.toObject = w.toObject(this)({ types: _, util: m });
|
|
1311
|
+
var x, N = E[N];
|
|
1312
|
+
return N && ((x = Object.create(this)).fromObject = this.fromObject, this.fromObject = N.fromObject.bind(x), x.toObject = this.toObject, this.toObject = N.toObject.bind(x)), this;
|
|
1313
|
+
}, g.prototype.encode = function(_, O) {
|
|
1314
|
+
return this.setup().encode(_, O);
|
|
1315
|
+
}, g.prototype.encodeDelimited = function(_, O) {
|
|
1316
|
+
return this.encode(_, O && O.len ? O.fork() : O).ldelim();
|
|
1317
|
+
}, g.prototype.decode = function(_, O, x, N) {
|
|
1318
|
+
return this.setup().decode(_, O, x, N);
|
|
1319
|
+
}, g.prototype.decodeDelimited = function(_) {
|
|
1320
|
+
return _ instanceof s || (_ = s.create(_)), this.decode(_, _.uint32());
|
|
1321
|
+
}, g.prototype.verify = function(_, O) {
|
|
1322
|
+
return this.setup().verify(_, O);
|
|
1323
|
+
}, g.prototype.fromObject = function(_, O) {
|
|
1324
|
+
return this.setup().fromObject(_, O);
|
|
1325
|
+
}, g.prototype.toObject = function(_, O) {
|
|
1326
|
+
return this.setup().toObject(_, O);
|
|
1327
|
+
}, g.d = function(_) {
|
|
1328
|
+
return function(O) {
|
|
1329
|
+
m.decorateType(O, _);
|
|
1330
|
+
};
|
|
1331
|
+
};
|
|
1332
|
+
}, { 11: 11, 12: 12, 13: 13, 14: 14, 15: 15, 18: 18, 19: 19, 21: 21, 23: 23, 24: 24, 30: 30, 33: 33, 37: 37, 38: 38, 39: 39 }], 32: [function(o, d, v) {
|
|
1333
|
+
var o = o(33), l = ["double", "float", "int32", "uint32", "sint32", "fixed32", "sfixed32", "int64", "uint64", "sint64", "fixed64", "sfixed64", "bool", "string", "bytes"];
|
|
1334
|
+
function c(f, r) {
|
|
1335
|
+
var n = 0, a = /* @__PURE__ */ Object.create(null);
|
|
1336
|
+
for (r |= 0; n < f.length; ) a[l[n + r]] = f[n++];
|
|
1337
|
+
return a;
|
|
1338
|
+
}
|
|
1339
|
+
v.basic = c([1, 5, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0, 2, 2]), v.defaults = c([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, !1, "", o.emptyArray, null]), v.long = c([0, 0, 0, 1, 1], 7), v.mapKey = c([0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0, 2], 2), v.packed = c([1, 5, 0, 0, 0, 5, 5, 0, 0, 0, 1, 1, 0]);
|
|
1340
|
+
}, { 33: 33 }], 33: [function(t, d, v) {
|
|
1341
|
+
var o, l, c = d.exports = t(35), f = t(27), r = (c.codegen = t(3), c.fetch = t(5), c.path = t(8), c.patterns = t(36), c.patterns.reservedRe), n = c.patterns.unsafePropertyRe, a = (c.fs = c.inquire("fs"), c.toArray = function(u) {
|
|
1342
|
+
if (u) {
|
|
1343
|
+
for (var m = Object.keys(u), p = Array(m.length), b = 0; b < m.length; ) p[b] = u[m[b++]];
|
|
1344
|
+
return p;
|
|
1345
|
+
}
|
|
1346
|
+
return [];
|
|
1347
|
+
}, c.toObject = function(u) {
|
|
1348
|
+
for (var m = {}, p = 0; p < u.length; ) {
|
|
1349
|
+
var b = u[p++], h = u[p++];
|
|
1350
|
+
h !== e && (m[b] = h);
|
|
1351
|
+
}
|
|
1352
|
+
return m;
|
|
1353
|
+
}, c.isReserved = function(u) {
|
|
1354
|
+
return r.test(u);
|
|
1355
|
+
}, c.safeProp = function(u) {
|
|
1356
|
+
return !/^[$\w_]+$/.test(u) || r.test(u) ? "[" + JSON.stringify(u) + "]" : "." + u;
|
|
1357
|
+
}, c.ucFirst = function(u) {
|
|
1358
|
+
return (u[0] || "").toUpperCase() + u.substring(1);
|
|
1359
|
+
}, /_([a-z])/g), s = (c.camelCase = function(u) {
|
|
1360
|
+
return u.substring(0, 1) + u.substring(1).replace(a, function(m, p) {
|
|
1361
|
+
return p.toUpperCase();
|
|
1362
|
+
});
|
|
1363
|
+
}, c.compareFieldsById = function(u, m) {
|
|
1364
|
+
return u.id - m.id;
|
|
1365
|
+
}, c.decorateType = function(u, m) {
|
|
1366
|
+
return u.$type ? (m && u.$type.name !== m && (c.decorateRoot.remove(u.$type), u.$type.name = m, c.decorateRoot.add(u.$type)), u.$type) : (m = new (o = o || t(31))(m || u.name), c.decorateRoot.add(m), m.ctor = u, Object.defineProperty(u, "$type", { value: m, enumerable: !1 }), Object.defineProperty(u.prototype, "$type", { value: m, enumerable: !1 }), m);
|
|
1367
|
+
}, 0);
|
|
1368
|
+
c.decorateEnum = function(u) {
|
|
1369
|
+
var m;
|
|
1370
|
+
return u.$type || (m = new (l = l || t(14))("Enum" + s++, u), c.decorateRoot.add(m), Object.defineProperty(u, "$type", { value: m, enumerable: !1 }), m);
|
|
1371
|
+
}, c.setProperty = function(u, m, p, b) {
|
|
1372
|
+
if (typeof u != "object") throw TypeError("dst must be an object");
|
|
1373
|
+
if (m) return (function h(w, E, g) {
|
|
1374
|
+
var j = E.shift();
|
|
1375
|
+
if (!n.test(j)) if (0 < E.length) w[j] = h(w[j] || {}, E, g);
|
|
1376
|
+
else {
|
|
1377
|
+
if ((E = w[j]) && b) return w;
|
|
1378
|
+
E && (g = [].concat(E).concat(g)), w[j] = g;
|
|
1379
|
+
}
|
|
1380
|
+
return w;
|
|
1381
|
+
})(u, m = m.split("."), p);
|
|
1382
|
+
throw TypeError("path must be specified");
|
|
1383
|
+
}, Object.defineProperty(c, "decorateRoot", { get: function() {
|
|
1384
|
+
return f.decorated || (f.decorated = new (t(26))());
|
|
1385
|
+
} });
|
|
1386
|
+
}, { 14: 14, 26: 26, 27: 27, 3: 3, 31: 31, 35: 35, 36: 36, 5: 5, 8: 8 }], 34: [function(t, d, v) {
|
|
1387
|
+
d.exports = l;
|
|
1388
|
+
var o = t(35);
|
|
1389
|
+
function l(r, n) {
|
|
1390
|
+
this.lo = r >>> 0, this.hi = n >>> 0;
|
|
1391
|
+
}
|
|
1392
|
+
var c = l.zero = new l(0, 0), f = (c.toNumber = function() {
|
|
1393
|
+
return 0;
|
|
1394
|
+
}, c.zzEncode = c.zzDecode = function() {
|
|
1395
|
+
return this;
|
|
1396
|
+
}, c.length = function() {
|
|
1397
|
+
return 1;
|
|
1398
|
+
}, l.zeroHash = "\0\0\0\0\0\0\0\0", l.fromNumber = function(r) {
|
|
1399
|
+
var n, a;
|
|
1400
|
+
return r === 0 ? c : (a = (r = (n = r < 0) ? -r : r) >>> 0, r = (r - a) / 4294967296 >>> 0, n && (r = ~r >>> 0, a = ~a >>> 0, 4294967295 < ++a && (a = 0, 4294967295 < ++r && (r = 0))), new l(a, r));
|
|
1401
|
+
}, l.from = function(r) {
|
|
1402
|
+
if (typeof r == "number") return l.fromNumber(r);
|
|
1403
|
+
if (o.isString(r)) {
|
|
1404
|
+
if (!o.Long) return l.fromNumber(parseInt(r, 10));
|
|
1405
|
+
r = o.Long.fromString(r);
|
|
1406
|
+
}
|
|
1407
|
+
return r.low || r.high ? new l(r.low >>> 0, r.high >>> 0) : c;
|
|
1408
|
+
}, l.prototype.toNumber = function(r) {
|
|
1409
|
+
var n;
|
|
1410
|
+
return !r && this.hi >>> 31 ? (r = 1 + ~this.lo >>> 0, n = ~this.hi >>> 0, -(r + 4294967296 * (n = r ? n : n + 1 >>> 0))) : this.lo + 4294967296 * this.hi;
|
|
1411
|
+
}, l.prototype.toLong = function(r) {
|
|
1412
|
+
return o.Long ? new o.Long(0 | this.lo, 0 | this.hi, !!r) : { low: 0 | this.lo, high: 0 | this.hi, unsigned: !!r };
|
|
1413
|
+
}, String.prototype.charCodeAt);
|
|
1414
|
+
l.fromHash = function(r) {
|
|
1415
|
+
return r === "\0\0\0\0\0\0\0\0" ? c : new l((f.call(r, 0) | f.call(r, 1) << 8 | f.call(r, 2) << 16 | f.call(r, 3) << 24) >>> 0, (f.call(r, 4) | f.call(r, 5) << 8 | f.call(r, 6) << 16 | f.call(r, 7) << 24) >>> 0);
|
|
1416
|
+
}, l.prototype.toHash = function() {
|
|
1417
|
+
return String.fromCharCode(255 & this.lo, this.lo >>> 8 & 255, this.lo >>> 16 & 255, this.lo >>> 24, 255 & this.hi, this.hi >>> 8 & 255, this.hi >>> 16 & 255, this.hi >>> 24);
|
|
1418
|
+
}, l.prototype.zzEncode = function() {
|
|
1419
|
+
var r = this.hi >> 31;
|
|
1420
|
+
return this.hi = ((this.hi << 1 | this.lo >>> 31) ^ r) >>> 0, this.lo = (this.lo << 1 ^ r) >>> 0, this;
|
|
1421
|
+
}, l.prototype.zzDecode = function() {
|
|
1422
|
+
var r = -(1 & this.lo);
|
|
1423
|
+
return this.lo = ((this.lo >>> 1 | this.hi << 31) ^ r) >>> 0, this.hi = (this.hi >>> 1 ^ r) >>> 0, this;
|
|
1424
|
+
}, l.prototype.length = function() {
|
|
1425
|
+
var r = this.lo, n = (this.lo >>> 28 | this.hi << 4) >>> 0, a = this.hi >>> 24;
|
|
1426
|
+
return a == 0 ? n == 0 ? r < 16384 ? r < 128 ? 1 : 2 : r < 2097152 ? 3 : 4 : n < 16384 ? n < 128 ? 5 : 6 : n < 2097152 ? 7 : 8 : a < 128 ? 9 : 10;
|
|
1427
|
+
};
|
|
1428
|
+
}, { 35: 35 }], 35: [function(t, d, v) {
|
|
1429
|
+
var o = v;
|
|
1430
|
+
function l(f, r, n) {
|
|
1431
|
+
for (var a = Object.keys(r), s = 0; s < a.length; ++s) f[a[s]] !== e && n || a[s] !== "__proto__" && (f[a[s]] = r[a[s]]);
|
|
1432
|
+
return f;
|
|
1433
|
+
}
|
|
1434
|
+
function c(f) {
|
|
1435
|
+
function r(n, a) {
|
|
1436
|
+
if (!(this instanceof r)) return new r(n, a);
|
|
1437
|
+
Object.defineProperty(this, "message", { get: function() {
|
|
1438
|
+
return n;
|
|
1439
|
+
} }), Error.captureStackTrace ? Error.captureStackTrace(this, r) : Object.defineProperty(this, "stack", { value: Error().stack || "" }), a && l(this, a);
|
|
1440
|
+
}
|
|
1441
|
+
return r.prototype = Object.create(Error.prototype, { constructor: { value: r, writable: !0, enumerable: !1, configurable: !0 }, name: { get: function() {
|
|
1442
|
+
return f;
|
|
1443
|
+
}, set: e, enumerable: !1, configurable: !0 }, toString: { value: function() {
|
|
1444
|
+
return this.name + ": " + this.message;
|
|
1445
|
+
}, writable: !0, enumerable: !1, configurable: !0 } }), r;
|
|
1446
|
+
}
|
|
1447
|
+
o.asPromise = t(1), o.base64 = t(2), o.EventEmitter = t(4), o.float = t(6), o.inquire = t(7), o.utf8 = t(10), o.pool = t(9), o.LongBits = t(34), o.isNode = !!(typeof global != "undefined" && global && global.process && global.process.versions && global.process.versions.node), o.global = o.isNode && global || typeof window != "undefined" && window || typeof self != "undefined" && self || this, o.emptyArray = Object.freeze ? Object.freeze([]) : [], o.emptyObject = Object.freeze ? Object.freeze({}) : {}, o.isInteger = Number.isInteger || function(f) {
|
|
1448
|
+
return typeof f == "number" && isFinite(f) && Math.floor(f) === f;
|
|
1449
|
+
}, o.isString = function(f) {
|
|
1450
|
+
return typeof f == "string" || f instanceof String;
|
|
1451
|
+
}, o.isObject = function(f) {
|
|
1452
|
+
return f && typeof f == "object";
|
|
1453
|
+
}, o.isset = o.isSet = function(f, r) {
|
|
1454
|
+
var n = f[r];
|
|
1455
|
+
return n != null && f.hasOwnProperty(r) && (typeof n != "object" || 0 < (Array.isArray(n) ? n : Object.keys(n)).length);
|
|
1456
|
+
}, o.Buffer = null, o.S = null, o.L = null, o.newBuffer = function(f) {
|
|
1457
|
+
return typeof f == "number" ? o.Buffer ? o.L(f) : new o.Array(f) : o.Buffer ? o.S(f) : typeof Uint8Array == "undefined" ? f : new Uint8Array(f);
|
|
1458
|
+
}, o.Array = typeof Uint8Array != "undefined" ? Uint8Array : Array, o.Long = o.global.dcodeIO && o.global.dcodeIO.Long || o.global.Long || o.inquire("long"), o.key2Re = /^true|false|0|1$/, o.key32Re = /^-?(?:0|[1-9][0-9]*)$/, o.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, o.longToHash = function(f) {
|
|
1459
|
+
return f ? o.LongBits.from(f).toHash() : o.LongBits.zeroHash;
|
|
1460
|
+
}, o.longFromHash = function(f, r) {
|
|
1461
|
+
return f = o.LongBits.fromHash(f), o.Long ? o.Long.fromBits(f.lo, f.hi, r) : f.toNumber(!!r);
|
|
1462
|
+
}, o.merge = l, o.recursionLimit = 100, o.makeProp = function(f, r) {
|
|
1463
|
+
Object.defineProperty(f, r, { enumerable: !0, configurable: !0, writable: !0 });
|
|
1464
|
+
}, o.lcFirst = function(f) {
|
|
1465
|
+
return (f[0] || "").toLowerCase() + f.substring(1);
|
|
1466
|
+
}, o.newError = c, o.ProtocolError = c("ProtocolError"), o.oneOfGetter = function(f) {
|
|
1467
|
+
for (var r = {}, n = 0; n < f.length; ++n) r[f[n]] = 1;
|
|
1468
|
+
return function() {
|
|
1469
|
+
for (var a = Object.keys(this), s = a.length - 1; -1 < s; --s) if (r[a[s]] === 1 && this[a[s]] !== e && this[a[s]] !== null) return a[s];
|
|
1470
|
+
};
|
|
1471
|
+
}, o.oneOfSetter = function(f) {
|
|
1472
|
+
return function(r) {
|
|
1473
|
+
for (var n = 0; n < f.length; ++n) f[n] !== r && delete this[f[n]];
|
|
1474
|
+
};
|
|
1475
|
+
}, o.toJSONOptions = { longs: String, enums: String, bytes: String, json: !0 }, o.c = function() {
|
|
1476
|
+
var f = o.Buffer;
|
|
1477
|
+
f ? (o.S = f.from !== Uint8Array.from && f.from || function(r, n) {
|
|
1478
|
+
return new f(r, n);
|
|
1479
|
+
}, o.L = f.allocUnsafe || function(r) {
|
|
1480
|
+
return new f(r);
|
|
1481
|
+
}) : o.S = o.L = null;
|
|
1482
|
+
};
|
|
1483
|
+
}, { 1: 1, 10: 10, 2: 2, 34: 34, 4: 4, 6: 6, 7: 7, 9: 9 }], 36: [function(t, d, v) {
|
|
1484
|
+
v.numberRe = /^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/, v.typeRefRe = /^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/, v.reservedRe = /^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/, v.unsafePropertyRe = /^(?:__proto__|prototype|constructor)$/;
|
|
1485
|
+
}, {}], 37: [function(t, d, v) {
|
|
1486
|
+
d.exports = function(r) {
|
|
1487
|
+
var n = l.codegen(["m", "n"], r.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected")("if(n===undefined)n=0")("if(n>util.recursionLimit)")("return%j", "maximum nesting depth exceeded"), a = r.oneofsArray, s = {};
|
|
1488
|
+
a.length && n("var p={}");
|
|
1489
|
+
for (var u = 0; u < r.fieldsArray.length; ++u) {
|
|
1490
|
+
var m, p = r.i[u].resolve(), b = "m" + l.safeProp(p.name);
|
|
1491
|
+
p.optional && n("if(%s!=null&&m.hasOwnProperty(%j)){", b, p.name), p.map ? (n("if(!util.isObject(%s))", b)("return%j", c(p, "object"))("var k=Object.keys(%s)", b)("for(var i=0;i<k.length;++i){"), (function(h, w, E) {
|
|
1492
|
+
switch (w.keyType) {
|
|
1493
|
+
case "int32":
|
|
1494
|
+
case "uint32":
|
|
1495
|
+
case "sint32":
|
|
1496
|
+
case "fixed32":
|
|
1497
|
+
case "sfixed32":
|
|
1498
|
+
h("if(!util.key32Re.test(%s))", E)("return%j", c(w, "integer key"));
|
|
1499
|
+
break;
|
|
1500
|
+
case "int64":
|
|
1501
|
+
case "uint64":
|
|
1502
|
+
case "sint64":
|
|
1503
|
+
case "fixed64":
|
|
1504
|
+
case "sfixed64":
|
|
1505
|
+
h("if(!util.key64Re.test(%s))", E)("return%j", c(w, "integer|Long key"));
|
|
1506
|
+
break;
|
|
1507
|
+
case "bool":
|
|
1508
|
+
h("if(!util.key2Re.test(%s))", E)("return%j", c(w, "boolean key"));
|
|
1509
|
+
}
|
|
1510
|
+
})(n, p, "k[i]"), f(n, p, u, b + "[k[i]]")("}")) : p.repeated ? (n("if(!Array.isArray(%s))", b)("return%j", c(p, "array"))("for(var i=0;i<%s.length;++i){", b), f(n, p, u, b + "[i]")("}")) : (p.partOf && (m = l.safeProp(p.partOf.name), s[p.partOf.name] === 1 && n("if(p%s===1)", m)("return%j", p.partOf.name + ": multiple values"), s[p.partOf.name] = 1, n("p%s=1", m)), f(n, p, u, b)), p.optional && n("}");
|
|
1511
|
+
}
|
|
1512
|
+
return n("return null");
|
|
1513
|
+
};
|
|
1514
|
+
var o = t(14), l = t(33);
|
|
1515
|
+
function c(r, n) {
|
|
1516
|
+
return r.name + ": " + n + (r.repeated && n !== "array" ? "[]" : r.map && n !== "object" ? "{k:" + r.keyType + "}" : "") + " expected";
|
|
1517
|
+
}
|
|
1518
|
+
function f(r, n, a, s) {
|
|
1519
|
+
if (n.resolvedType) if (n.resolvedType instanceof o) {
|
|
1520
|
+
r("switch(%s){", s)("default:")("return%j", c(n, "enum value"));
|
|
1521
|
+
for (var u = Object.keys(n.resolvedType.values), m = 0; m < u.length; ++m) r("case %i:", n.resolvedType.values[u[m]]);
|
|
1522
|
+
r("break")("}");
|
|
1523
|
+
} else r("{")("var e=types[%i].verify(%s,n+1);", a, s)("if(e)")("return%j+e", n.name + ".")("}");
|
|
1524
|
+
else switch (n.type) {
|
|
1525
|
+
case "int32":
|
|
1526
|
+
case "uint32":
|
|
1527
|
+
case "sint32":
|
|
1528
|
+
case "fixed32":
|
|
1529
|
+
case "sfixed32":
|
|
1530
|
+
r("if(!util.isInteger(%s))", s)("return%j", c(n, "integer"));
|
|
1531
|
+
break;
|
|
1532
|
+
case "int64":
|
|
1533
|
+
case "uint64":
|
|
1534
|
+
case "sint64":
|
|
1535
|
+
case "fixed64":
|
|
1536
|
+
case "sfixed64":
|
|
1537
|
+
r("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))", s, s, s, s)("return%j", c(n, "integer|Long"));
|
|
1538
|
+
break;
|
|
1539
|
+
case "float":
|
|
1540
|
+
case "double":
|
|
1541
|
+
r('if(typeof %s!=="number")', s)("return%j", c(n, "number"));
|
|
1542
|
+
break;
|
|
1543
|
+
case "bool":
|
|
1544
|
+
r('if(typeof %s!=="boolean")', s)("return%j", c(n, "boolean"));
|
|
1545
|
+
break;
|
|
1546
|
+
case "string":
|
|
1547
|
+
r("if(!util.isString(%s))", s)("return%j", c(n, "string"));
|
|
1548
|
+
break;
|
|
1549
|
+
case "bytes":
|
|
1550
|
+
r('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))', s, s, s)("return%j", c(n, "buffer"));
|
|
1551
|
+
}
|
|
1552
|
+
return r;
|
|
1553
|
+
}
|
|
1554
|
+
}, { 14: 14, 33: 33 }], 38: [function(t, d, v) {
|
|
1555
|
+
var o = t(19);
|
|
1556
|
+
v[".google.protobuf.Any"] = { fromObject: function(l, c) {
|
|
1557
|
+
if (l && l["@type"]) {
|
|
1558
|
+
var f, r = l["@type"].substring(1 + l["@type"].lastIndexOf("/")), r = this.lookup(r);
|
|
1559
|
+
if (r) return ~(f = (l["@type"][0] || "") == "." ? l["@type"].slice(1) : l["@type"]).indexOf("/") || (f = "/" + f), this.create({ type_url: f, value: r.encode(r.fromObject(l, c === e ? 1 : c + 1)).finish() });
|
|
1560
|
+
}
|
|
1561
|
+
return this.fromObject(l, c);
|
|
1562
|
+
}, toObject: function(l, c) {
|
|
1563
|
+
var f, r, n = "", a = "";
|
|
1564
|
+
return c && c.json && l.type_url && l.value && (a = l.type_url.substring(1 + l.type_url.lastIndexOf("/")), n = l.type_url.substring(0, 1 + l.type_url.lastIndexOf("/")), (f = this.lookup(a)) && (l = f.decode(l.value))), !(l instanceof this.ctor) && l instanceof o ? (f = l.$type.toObject(l, c), r = l.$type.fullName[0] === "." ? l.$type.fullName.slice(1) : l.$type.fullName, f["@type"] = a = (n = n === "" ? "type.googleapis.com/" : n) + r, f) : this.toObject(l, c);
|
|
1565
|
+
} };
|
|
1566
|
+
}, { 19: 19 }], 39: [function(t, d, v) {
|
|
1567
|
+
d.exports = u;
|
|
1568
|
+
var o, l = t(35), c = l.LongBits, f = l.base64, r = l.utf8;
|
|
1569
|
+
function n(g, j, _) {
|
|
1570
|
+
this.fn = g, this.len = j, this.next = e, this.val = _;
|
|
1571
|
+
}
|
|
1572
|
+
function a() {
|
|
1573
|
+
}
|
|
1574
|
+
function s(g) {
|
|
1575
|
+
this.head = g.head, this.tail = g.tail, this.len = g.len, this.next = g.states;
|
|
1576
|
+
}
|
|
1577
|
+
function u() {
|
|
1578
|
+
this.len = 0, this.head = new n(a, 0, 0), this.tail = this.head, this.states = null;
|
|
1579
|
+
}
|
|
1580
|
+
function m() {
|
|
1581
|
+
return l.Buffer ? function() {
|
|
1582
|
+
return (u.create = function() {
|
|
1583
|
+
return new o();
|
|
1584
|
+
})();
|
|
1585
|
+
} : function() {
|
|
1586
|
+
return new u();
|
|
1587
|
+
};
|
|
1588
|
+
}
|
|
1589
|
+
function p(g, j, _) {
|
|
1590
|
+
j[_] = 255 & g;
|
|
1591
|
+
}
|
|
1592
|
+
function b(g, j) {
|
|
1593
|
+
this.len = g, this.next = e, this.val = j;
|
|
1594
|
+
}
|
|
1595
|
+
function h(g, j, _) {
|
|
1596
|
+
for (; g.hi; ) j[_++] = 127 & g.lo | 128, g.lo = (g.lo >>> 7 | g.hi << 25) >>> 0, g.hi >>>= 7;
|
|
1597
|
+
for (; 127 < g.lo; ) j[_++] = 127 & g.lo | 128, g.lo = g.lo >>> 7;
|
|
1598
|
+
j[_++] = g.lo;
|
|
1599
|
+
}
|
|
1600
|
+
function w(g, j, _) {
|
|
1601
|
+
j[_] = 255 & g, j[_ + 1] = g >>> 8 & 255, j[_ + 2] = g >>> 16 & 255, j[_ + 3] = g >>> 24;
|
|
1602
|
+
}
|
|
1603
|
+
u.create = m(), u.alloc = function(g) {
|
|
1604
|
+
return new l.Array(g);
|
|
1605
|
+
}, l.Array !== Array && (u.alloc = l.pool(u.alloc, l.Array.prototype.subarray)), u.prototype.N = function(g, j, _) {
|
|
1606
|
+
return this.tail = this.tail.next = new n(g, j, _), this.len += j, this;
|
|
1607
|
+
}, (b.prototype = Object.create(n.prototype)).fn = function(g, j, _) {
|
|
1608
|
+
for (; 127 < g; ) j[_++] = 127 & g | 128, g >>>= 7;
|
|
1609
|
+
j[_] = g;
|
|
1610
|
+
}, u.prototype.uint32 = function(g) {
|
|
1611
|
+
return this.len += (this.tail = this.tail.next = new b((g >>>= 0) < 128 ? 1 : g < 16384 ? 2 : g < 2097152 ? 3 : g < 268435456 ? 4 : 5, g)).len, this;
|
|
1612
|
+
}, u.prototype.int32 = function(g) {
|
|
1613
|
+
return g < 0 ? this.N(h, 10, c.fromNumber(g)) : this.uint32(g);
|
|
1614
|
+
}, u.prototype.sint32 = function(g) {
|
|
1615
|
+
return this.uint32((g << 1 ^ g >> 31) >>> 0);
|
|
1616
|
+
}, u.prototype.int64 = u.prototype.uint64 = function(g) {
|
|
1617
|
+
return g = c.from(g), this.N(h, g.length(), g);
|
|
1618
|
+
}, u.prototype.sint64 = function(g) {
|
|
1619
|
+
return g = c.from(g).zzEncode(), this.N(h, g.length(), g);
|
|
1620
|
+
}, u.prototype.bool = function(g) {
|
|
1621
|
+
return this.N(p, 1, g ? 1 : 0);
|
|
1622
|
+
}, u.prototype.sfixed32 = u.prototype.fixed32 = function(g) {
|
|
1623
|
+
return this.N(w, 4, g >>> 0);
|
|
1624
|
+
}, u.prototype.sfixed64 = u.prototype.fixed64 = function(g) {
|
|
1625
|
+
return g = c.from(g), this.N(w, 4, g.lo).N(w, 4, g.hi);
|
|
1626
|
+
}, u.prototype.float = function(g) {
|
|
1627
|
+
return this.N(l.float.writeFloatLE, 4, g);
|
|
1628
|
+
}, u.prototype.double = function(g) {
|
|
1629
|
+
return this.N(l.float.writeDoubleLE, 8, g);
|
|
1630
|
+
};
|
|
1631
|
+
var E = l.Array.prototype.set ? function(g, j, _) {
|
|
1632
|
+
j.set(g, _);
|
|
1633
|
+
} : function(g, j, _) {
|
|
1634
|
+
for (var O = 0; O < g.length; ++O) j[_ + O] = g[O];
|
|
1635
|
+
};
|
|
1636
|
+
u.prototype.bytes = function(g) {
|
|
1637
|
+
var j, _ = g.length >>> 0;
|
|
1638
|
+
return _ ? (l.isString(g) && (j = u.alloc(_ = f.length(g)), f.decode(g, j, 0), g = j), this.uint32(_).N(E, _, g)) : this.N(p, 1, 0);
|
|
1639
|
+
}, u.prototype.string = function(g) {
|
|
1640
|
+
var j = r.length(g);
|
|
1641
|
+
return j ? this.uint32(j).N(r.write, j, g) : this.N(p, 1, 0);
|
|
1642
|
+
}, u.prototype.fork = function() {
|
|
1643
|
+
return this.states = new s(this), this.head = this.tail = new n(a, 0, 0), this.len = 0, this;
|
|
1644
|
+
}, u.prototype.reset = function() {
|
|
1645
|
+
return this.states ? (this.head = this.states.head, this.tail = this.states.tail, this.len = this.states.len, this.states = this.states.next) : (this.head = this.tail = new n(a, 0, 0), this.len = 0), this;
|
|
1646
|
+
}, u.prototype.ldelim = function() {
|
|
1647
|
+
var g = this.head, j = this.tail, _ = this.len;
|
|
1648
|
+
return this.reset().uint32(_), _ && (this.tail.next = g.next, this.tail = j, this.len += _), this;
|
|
1649
|
+
}, u.prototype.finish = function() {
|
|
1650
|
+
for (var g = this.head.next, j = this.constructor.alloc(this.len), _ = 0; g; ) g.fn(g.val, j, _), _ += g.len, g = g.next;
|
|
1651
|
+
return j;
|
|
1652
|
+
}, u.c = function(g) {
|
|
1653
|
+
o = g, u.create = m(), o.c();
|
|
1654
|
+
};
|
|
1655
|
+
}, { 35: 35 }], 40: [function(t, d, v) {
|
|
1656
|
+
d.exports = c;
|
|
1657
|
+
var o = t(39), l = ((c.prototype = Object.create(o.prototype)).constructor = c, t(35));
|
|
1658
|
+
function c() {
|
|
1659
|
+
o.call(this);
|
|
1660
|
+
}
|
|
1661
|
+
function f(r, n, a) {
|
|
1662
|
+
r.length < 40 ? l.utf8.write(r, n, a) : n.utf8Write ? n.utf8Write(r, a) : n.write(r, a);
|
|
1663
|
+
}
|
|
1664
|
+
c.c = function() {
|
|
1665
|
+
c.alloc = l.L, c.writeBytesBuffer = l.Buffer && l.Buffer.prototype instanceof Uint8Array && l.Buffer.prototype.set.name === "set" ? function(r, n, a) {
|
|
1666
|
+
n.set(r, a);
|
|
1667
|
+
} : function(r, n, a) {
|
|
1668
|
+
if (r.copy) r.copy(n, a, 0, r.length);
|
|
1669
|
+
else for (var s = 0; s < r.length; ) n[a++] = r[s++];
|
|
1670
|
+
};
|
|
1671
|
+
}, c.prototype.bytes = function(r) {
|
|
1672
|
+
var n = (r = l.isString(r) ? l.S(r, "base64") : r).length >>> 0;
|
|
1673
|
+
return this.uint32(n), n && this.N(c.writeBytesBuffer, n, r), this;
|
|
1674
|
+
}, c.prototype.string = function(r) {
|
|
1675
|
+
var n = l.Buffer.byteLength(r);
|
|
1676
|
+
return this.uint32(n), n && this.N(f, n, r), this;
|
|
1677
|
+
}, c.c();
|
|
1678
|
+
}, { 35: 35, 39: 39 }] }, y = {}, ce = (function t(d) {
|
|
1679
|
+
var v = y[d];
|
|
1680
|
+
return v || i[d][0].call(v = y[d] = { exports: {} }, t, v, v.exports), v.exports;
|
|
1681
|
+
})([16][0]);
|
|
1682
|
+
})();
|
|
1683
|
+
const Xe = 4096, Tt = 1 << 20;
|
|
1684
|
+
let D = new Uint8Array(Xe), fe = new DataView(D.buffer), R = 0, F = 0, $ = 0;
|
|
1685
|
+
function xt() {
|
|
1686
|
+
return R;
|
|
1687
|
+
}
|
|
1688
|
+
function St(e) {
|
|
1689
|
+
return D.slice(e, R);
|
|
1690
|
+
}
|
|
1691
|
+
function Nt(e) {
|
|
1692
|
+
R = e, e === 0 && D.length > Tt && (D = new Uint8Array(Xe), fe = new DataView(D.buffer));
|
|
1693
|
+
}
|
|
1694
|
+
function H(e) {
|
|
1695
|
+
if (R + e > D.length) {
|
|
1696
|
+
const i = new Uint8Array(Math.max(D.length * 2, R + e));
|
|
1697
|
+
i.set(D.subarray(0, R)), D = i, fe = new DataView(i.buffer);
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
function ie(e) {
|
|
1701
|
+
for (; e > 127; )
|
|
1702
|
+
D[R++] = e & 127 | 128, e >>>= 7;
|
|
1703
|
+
D[R++] = e;
|
|
1704
|
+
}
|
|
1705
|
+
function Se() {
|
|
1706
|
+
for (; $; )
|
|
1707
|
+
D[R++] = F & 127 | 128, F = (F >>> 7 | $ << 25) >>> 0, $ >>>= 7;
|
|
1708
|
+
ie(F);
|
|
1709
|
+
}
|
|
1710
|
+
function ve(e) {
|
|
1711
|
+
D[R++] = e & 255, D[R++] = e >>> 8 & 255, D[R++] = e >>> 16 & 255, D[R++] = e >>> 24;
|
|
1712
|
+
}
|
|
1713
|
+
function Ne(e) {
|
|
1714
|
+
if (e === 0) {
|
|
1715
|
+
F = $ = 0;
|
|
1716
|
+
return;
|
|
1717
|
+
}
|
|
1718
|
+
const i = e < 0;
|
|
1719
|
+
i && (e = -e), F = e >>> 0, $ = (e - F) / 4294967296 >>> 0, i && ($ = ~$ >>> 0, F = ~F >>> 0, ++F > 4294967295 && (F = 0, ++$ > 4294967295 && ($ = 0)));
|
|
1720
|
+
}
|
|
1721
|
+
function V(e) {
|
|
1722
|
+
H(5), e < 128 ? D[R++] = e : ie(e);
|
|
1723
|
+
}
|
|
1724
|
+
function Ct(e) {
|
|
1725
|
+
H(1), D[R++] = e;
|
|
1726
|
+
}
|
|
1727
|
+
function Qe(e) {
|
|
1728
|
+
H(5), ie(e >>> 0);
|
|
1729
|
+
}
|
|
1730
|
+
function et(e) {
|
|
1731
|
+
e |= 0, H(10), e < 0 ? (F = e >>> 0, $ = 4294967295, Se()) : ie(e);
|
|
1732
|
+
}
|
|
1733
|
+
function Rt(e) {
|
|
1734
|
+
e |= 0, Qe((e << 1 ^ e >> 31) >>> 0);
|
|
1735
|
+
}
|
|
1736
|
+
function Be(e) {
|
|
1737
|
+
H(4), ve(e >>> 0);
|
|
1738
|
+
}
|
|
1739
|
+
function Fe(e) {
|
|
1740
|
+
Ne(e), H(10), Se();
|
|
1741
|
+
}
|
|
1742
|
+
function It(e) {
|
|
1743
|
+
Ne(e);
|
|
1744
|
+
const i = $ >> 31;
|
|
1745
|
+
$ = (($ << 1 | F >>> 31) ^ i) >>> 0, F = (F << 1 ^ i) >>> 0, H(10), Se();
|
|
1746
|
+
}
|
|
1747
|
+
function Ue(e) {
|
|
1748
|
+
Ne(e), H(8), ve(F), ve($);
|
|
1749
|
+
}
|
|
1750
|
+
function Dt(e) {
|
|
1751
|
+
H(8), fe.setFloat64(R, e, !0), R += 8;
|
|
1752
|
+
}
|
|
1753
|
+
function Lt(e) {
|
|
1754
|
+
H(4), fe.setFloat32(R, e, !0), R += 4;
|
|
1755
|
+
}
|
|
1756
|
+
function Pt(e) {
|
|
1757
|
+
const i = e.length >>> 0;
|
|
1758
|
+
H(i + 5), ie(i), i && (D.set(e, R), R += i);
|
|
1759
|
+
}
|
|
1760
|
+
function Ce() {
|
|
1761
|
+
return H(1), R++;
|
|
1762
|
+
}
|
|
1763
|
+
function pe(e) {
|
|
1764
|
+
const i = R - e - 1;
|
|
1765
|
+
if (i < 128) {
|
|
1766
|
+
D[e] = i;
|
|
1767
|
+
return;
|
|
1768
|
+
}
|
|
1769
|
+
const y = i < 16384 ? 2 : i < 2097152 ? 3 : i < 268435456 ? 4 : 5;
|
|
1770
|
+
H(y - 1), D.copyWithin(e + y, e + 1, R), R = e + y + i;
|
|
1771
|
+
let t = i;
|
|
1772
|
+
for (let d = 0; d < y - 1; d++)
|
|
1773
|
+
D[e + d] = t & 127 | 128, t >>>= 7;
|
|
1774
|
+
D[e + y - 1] = t;
|
|
1775
|
+
}
|
|
1776
|
+
function Mt(e) {
|
|
1777
|
+
const i = e.length;
|
|
1778
|
+
H(i * 3 + 5);
|
|
1779
|
+
const y = D, t = R++;
|
|
1780
|
+
let d = R, v = 0, o = 0;
|
|
1781
|
+
for (; v < i && (o = e.charCodeAt(v)) < 128; )
|
|
1782
|
+
y[d++] = o, v++;
|
|
1783
|
+
for (; v < i; v++)
|
|
1784
|
+
o = e.charCodeAt(v), o < 128 ? y[d++] = o : o < 2048 ? (y[d++] = o >> 6 | 192, y[d++] = o & 63 | 128) : (o & 64512) === 55296 && (e.charCodeAt(v + 1) & 64512) === 56320 ? (o = 65536 + ((o & 1023) << 10) + (e.charCodeAt(++v) & 1023), y[d++] = o >> 18 | 240, y[d++] = o >> 12 & 63 | 128, y[d++] = o >> 6 & 63 | 128, y[d++] = o & 63 | 128) : (y[d++] = o >> 12 | 224, y[d++] = o >> 6 & 63 | 128, y[d++] = o & 63 | 128);
|
|
1785
|
+
R = d, pe(t);
|
|
1786
|
+
}
|
|
1787
|
+
const he = 0, X = 1, tt = 2, rt = 3, nt = 4, Bt = 5, Q = Object.prototype.hasOwnProperty;
|
|
1788
|
+
function we(e, i) {
|
|
1789
|
+
return e && typeof e == "object" && Q.call(e, i) ? e[i] : void 0;
|
|
1790
|
+
}
|
|
1791
|
+
function Ft(e) {
|
|
1792
|
+
return e.fields !== void 0 ? X : e.values !== void 0 ? tt : e.methods !== void 0 ? rt : e.id !== void 0 ? nt : he;
|
|
1793
|
+
}
|
|
1794
|
+
function _e(e) {
|
|
1795
|
+
return e === he || e === X || e === rt;
|
|
1796
|
+
}
|
|
1797
|
+
function de(e, i, y) {
|
|
1798
|
+
const t = we(e.nested, i);
|
|
1799
|
+
return t && typeof t == "object" ? { node: t, kind: Ft(t), path: y.concat(i) } : null;
|
|
1800
|
+
}
|
|
1801
|
+
function Ut(e, i) {
|
|
1802
|
+
if (e.kind === X) {
|
|
1803
|
+
const y = we(e.node.fields, i);
|
|
1804
|
+
if (y)
|
|
1805
|
+
return { node: y, kind: nt, path: e.path.concat(i) };
|
|
1806
|
+
const t = we(e.node.oneofs, i);
|
|
1807
|
+
if (t)
|
|
1808
|
+
return { node: t, kind: Bt, path: e.path.concat(i) };
|
|
1809
|
+
}
|
|
1810
|
+
return de(e.node, i, e.path);
|
|
1811
|
+
}
|
|
1812
|
+
function Oe(e, i, y) {
|
|
1813
|
+
const t = Ut(e, i[y]);
|
|
1814
|
+
let d = null;
|
|
1815
|
+
if (t)
|
|
1816
|
+
y === i.length - 1 ? d = t : _e(t.kind) && (d = Oe(t, i, y + 1));
|
|
1817
|
+
else if (e.node.nested && typeof e.node.nested == "object")
|
|
1818
|
+
for (const v of Object.keys(e.node.nested)) {
|
|
1819
|
+
const o = de(e.node, v, e.path);
|
|
1820
|
+
o && _e(o.kind) && (d = Oe(o, i, y) || d);
|
|
1821
|
+
}
|
|
1822
|
+
return d;
|
|
1823
|
+
}
|
|
1824
|
+
function $t(e, i) {
|
|
1825
|
+
let y = { node: e, kind: he, path: [] };
|
|
1826
|
+
for (let t = 0; y && t < i.length; t++)
|
|
1827
|
+
y = _e(y.kind) ? de(y.node, i[t], y.path) : null;
|
|
1828
|
+
return y;
|
|
1829
|
+
}
|
|
1830
|
+
function st(e, i, y, t) {
|
|
1831
|
+
y[0] === "" && (i = [], y = y.slice(1));
|
|
1832
|
+
const d = $t(e, y);
|
|
1833
|
+
if (d && t(d.kind))
|
|
1834
|
+
return d;
|
|
1835
|
+
const v = [{ node: e, kind: he, path: [] }];
|
|
1836
|
+
for (const o of i)
|
|
1837
|
+
v.push(de(v[v.length - 1].node, o, v[v.length - 1].path));
|
|
1838
|
+
for (let o = v.length - 1; o >= 0; o--) {
|
|
1839
|
+
const l = Oe(v[o], y, 0);
|
|
1840
|
+
if (l && t(l.kind))
|
|
1841
|
+
return l;
|
|
1842
|
+
}
|
|
1843
|
+
return null;
|
|
1844
|
+
}
|
|
1845
|
+
const ot = 100, Ht = 0, K = 1, le = 2, it = 3, at = 4, $e = /* @__PURE__ */ new WeakMap(), ut = () => {
|
|
1846
|
+
}, qt = new Uint8Array(0), zt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", te = (e) => Number.isInteger(e), re = (e) => Number.isInteger(e) || !!(e && Number.isInteger(e.low) && Number.isInteger(e.high)), He = (e) => typeof e == "number", Jt = (e) => typeof e == "boolean", lt = (e) => typeof e == "string" || e instanceof String, Vt = (e) => !!(e && typeof e.length == "number") || lt(e);
|
|
1847
|
+
function ne(e, i) {
|
|
1848
|
+
if (typeof e == "string")
|
|
1849
|
+
return parseInt(e, 10);
|
|
1850
|
+
if (e && typeof e == "object") {
|
|
1851
|
+
const y = e.low >>> 0, t = e.high >>> 0;
|
|
1852
|
+
if (!i && t >>> 31) {
|
|
1853
|
+
const d = ~y + 1 >>> 0, v = d ? ~t >>> 0 : (~t >>> 0) + 1 >>> 0;
|
|
1854
|
+
return -(d + v * 4294967296);
|
|
1855
|
+
}
|
|
1856
|
+
return y + t * 4294967296;
|
|
1857
|
+
}
|
|
1858
|
+
return e;
|
|
1859
|
+
}
|
|
1860
|
+
function Kt(e) {
|
|
1861
|
+
const i = new Uint8Array(Math.ceil(e.length * 3 / 4));
|
|
1862
|
+
let y = 0, t = 0, d = 0;
|
|
1863
|
+
for (let v = 0; v < e.length; ) {
|
|
1864
|
+
const o = e.charAt(v++);
|
|
1865
|
+
if (o === "=" && t > 1)
|
|
1866
|
+
break;
|
|
1867
|
+
const l = zt.indexOf(o);
|
|
1868
|
+
if (l < 0)
|
|
1869
|
+
throw new Error("invalid encoding");
|
|
1870
|
+
t === 0 ? (d = l, t = 1) : t === 1 ? (i[y++] = d << 2 | (l & 48) >> 4, d = l, t = 2) : t === 2 ? (i[y++] = (d & 15) << 4 | (l & 60) >> 2, d = l, t = 3) : (i[y++] = (d & 3) << 6 | l, t = 0);
|
|
1871
|
+
}
|
|
1872
|
+
if (t === 1)
|
|
1873
|
+
throw new Error("invalid encoding");
|
|
1874
|
+
return i.subarray(0, y);
|
|
1875
|
+
}
|
|
1876
|
+
const P = (e, i, y, t, d, v = Ht) => ({
|
|
1877
|
+
wt: e,
|
|
1878
|
+
put: i,
|
|
1879
|
+
ok: y,
|
|
1880
|
+
exp: t,
|
|
1881
|
+
def: d,
|
|
1882
|
+
vk: v
|
|
1883
|
+
}), ae = {
|
|
1884
|
+
double: P(1, (e) => Dt(Number(e)), He, "number", 0, le),
|
|
1885
|
+
float: P(5, (e) => Lt(Number(e)), He, "number", 0, le),
|
|
1886
|
+
int32: P(0, et, te, "integer", 0, K),
|
|
1887
|
+
uint32: P(0, Qe, te, "integer", 0, K),
|
|
1888
|
+
sint32: P(0, Rt, te, "integer", 0, K),
|
|
1889
|
+
fixed32: P(5, Be, te, "integer", 0, K),
|
|
1890
|
+
sfixed32: P(5, Be, te, "integer", 0, K),
|
|
1891
|
+
int64: P(0, (e) => Fe(ne(e)), re, "integer|Long", 0),
|
|
1892
|
+
uint64: P(0, (e) => Fe(ne(e, !0)), re, "integer|Long", 0),
|
|
1893
|
+
sint64: P(0, (e) => It(ne(e)), re, "integer|Long", 0),
|
|
1894
|
+
fixed64: P(1, (e) => Ue(ne(e)), re, "integer|Long", 0),
|
|
1895
|
+
sfixed64: P(1, (e) => Ue(ne(e)), re, "integer|Long", 0),
|
|
1896
|
+
bool: P(0, (e) => Ct(e ? 1 : 0), Jt, "boolean", !1, at),
|
|
1897
|
+
string: P(2, (e) => Mt(typeof e == "string" ? e : String(e)), lt, "string", "", it),
|
|
1898
|
+
bytes: P(2, (e) => Pt(typeof e == "string" ? Kt(e) : e), Vt, "buffer", qt)
|
|
1899
|
+
};
|
|
1900
|
+
function ct(e) {
|
|
1901
|
+
return `${e.owner.full}.${e.name}`;
|
|
1902
|
+
}
|
|
1903
|
+
function Wt(e) {
|
|
1904
|
+
return new TypeError(`${ct(e)}: array expected`);
|
|
1905
|
+
}
|
|
1906
|
+
function Re(e) {
|
|
1907
|
+
return new TypeError(`${ct(e)}: object expected`);
|
|
1908
|
+
}
|
|
1909
|
+
function Ie(e, i) {
|
|
1910
|
+
if (!i)
|
|
1911
|
+
return null;
|
|
1912
|
+
if (!Array.isArray(i))
|
|
1913
|
+
throw Wt(e);
|
|
1914
|
+
return i.length ? i : null;
|
|
1915
|
+
}
|
|
1916
|
+
function De(e, i, y) {
|
|
1917
|
+
if (typeof i != "object" || i === null)
|
|
1918
|
+
throw Re(e);
|
|
1919
|
+
const t = Ce();
|
|
1920
|
+
ft(e.child, i, y + 1), pe(t);
|
|
1921
|
+
}
|
|
1922
|
+
function Zt(e, i) {
|
|
1923
|
+
V(e.tag), e.put(i);
|
|
1924
|
+
}
|
|
1925
|
+
function Gt(e, i) {
|
|
1926
|
+
const y = Ie(e, i);
|
|
1927
|
+
if (y) {
|
|
1928
|
+
V(e.tag);
|
|
1929
|
+
const t = Ce();
|
|
1930
|
+
for (let d = 0; d < y.length; d++)
|
|
1931
|
+
e.put(y[d]);
|
|
1932
|
+
pe(t);
|
|
1933
|
+
}
|
|
1934
|
+
}
|
|
1935
|
+
function Yt(e, i) {
|
|
1936
|
+
const y = Ie(e, i);
|
|
1937
|
+
if (y)
|
|
1938
|
+
for (let t = 0; t < y.length; t++)
|
|
1939
|
+
V(e.tag), e.put(y[t]);
|
|
1940
|
+
}
|
|
1941
|
+
function Xt(e, i, y) {
|
|
1942
|
+
if (typeof i != "object")
|
|
1943
|
+
throw Re(e);
|
|
1944
|
+
V(e.tag), De(e, i, y);
|
|
1945
|
+
}
|
|
1946
|
+
function Qt(e, i, y) {
|
|
1947
|
+
const t = Ie(e, i);
|
|
1948
|
+
if (t)
|
|
1949
|
+
for (let d = 0; d < t.length; d++)
|
|
1950
|
+
V(e.tag), De(e, t[d], y);
|
|
1951
|
+
}
|
|
1952
|
+
function er(e, i, y) {
|
|
1953
|
+
if (!i)
|
|
1954
|
+
return;
|
|
1955
|
+
if (typeof i != "object")
|
|
1956
|
+
throw Re(e);
|
|
1957
|
+
const t = Object.keys(i);
|
|
1958
|
+
for (let d = 0; d < t.length; d++) {
|
|
1959
|
+
V(e.tag);
|
|
1960
|
+
const v = Ce();
|
|
1961
|
+
V(e.ktag), e.kput(t[d]), V(e.vtag), e.child ? De(e, i[t[d]], y) : e.put(i[t[d]]), pe(v);
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
function ft(e, i, y) {
|
|
1965
|
+
if (y > ot)
|
|
1966
|
+
throw new Error("maximum nesting depth exceeded");
|
|
1967
|
+
const t = e.fields;
|
|
1968
|
+
for (let d = 0; d < t.length; d++) {
|
|
1969
|
+
const v = t[d];
|
|
1970
|
+
let o = i[v.name];
|
|
1971
|
+
if (o == null) {
|
|
1972
|
+
if (!v.required)
|
|
1973
|
+
continue;
|
|
1974
|
+
o = v.def;
|
|
1975
|
+
}
|
|
1976
|
+
v.write(v, o, y);
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
function Y(e, i) {
|
|
1980
|
+
return `${e.name}: ${i}${e.repeated && i !== "array" ? "[]" : e.keyType && i !== "object" ? `{k:${e.keyType}}` : ""} expected`;
|
|
1981
|
+
}
|
|
1982
|
+
const tr = /^-?(?:0|[1-9][0-9]*)$/, rr = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, nr = /(?:^true)|false|0|(?:1$)/;
|
|
1983
|
+
function pt(e, i) {
|
|
1984
|
+
switch (e.vk) {
|
|
1985
|
+
case K:
|
|
1986
|
+
return Number.isInteger(i);
|
|
1987
|
+
case le:
|
|
1988
|
+
return typeof i == "number";
|
|
1989
|
+
case it:
|
|
1990
|
+
return typeof i == "string" || i instanceof String;
|
|
1991
|
+
case at:
|
|
1992
|
+
return typeof i == "boolean";
|
|
1993
|
+
default:
|
|
1994
|
+
return e.ok(i);
|
|
1995
|
+
}
|
|
1996
|
+
}
|
|
1997
|
+
function ke(e, i, y) {
|
|
1998
|
+
if (e.child) {
|
|
1999
|
+
const t = ht(e.child, i, y + 1);
|
|
2000
|
+
return t && `${e.name}.${t}`;
|
|
2001
|
+
}
|
|
2002
|
+
return pt(e, i) ? null : Y(e, e.exp);
|
|
2003
|
+
}
|
|
2004
|
+
function sr(e, i, y) {
|
|
2005
|
+
let t = 0;
|
|
2006
|
+
if (e.vk === K)
|
|
2007
|
+
for (; t < i.length && Number.isInteger(i[t]); )
|
|
2008
|
+
t++;
|
|
2009
|
+
else if (e.vk === le)
|
|
2010
|
+
for (; t < i.length && typeof i[t] == "number"; )
|
|
2011
|
+
t++;
|
|
2012
|
+
else {
|
|
2013
|
+
for (let d; t < i.length; t++)
|
|
2014
|
+
if (d = ke(e, i[t], y))
|
|
2015
|
+
return d;
|
|
2016
|
+
return null;
|
|
2017
|
+
}
|
|
2018
|
+
return t < i.length ? Y(e, e.exp) : null;
|
|
2019
|
+
}
|
|
2020
|
+
function or(e, i, y, t) {
|
|
2021
|
+
let d = null;
|
|
2022
|
+
if (e.keyType) {
|
|
2023
|
+
if (!y || typeof y != "object")
|
|
2024
|
+
return Y(e, "object");
|
|
2025
|
+
const v = Object.keys(y);
|
|
2026
|
+
for (let o = 0; !d && o < v.length; o++)
|
|
2027
|
+
d = e.kre && !e.kre.test(v[o]) ? Y(e, e.kexp) : ke(e, y[v[o]], t);
|
|
2028
|
+
} else if (e.repeated) {
|
|
2029
|
+
if (!Array.isArray(y))
|
|
2030
|
+
return Y(e, "array");
|
|
2031
|
+
d = sr(e, y, t);
|
|
2032
|
+
} else {
|
|
2033
|
+
for (let v = 0; v < e.prior.length; v++)
|
|
2034
|
+
if (i[e.prior[v].name] != null && Q.call(i, e.prior[v].name))
|
|
2035
|
+
return `${e.oneof}: multiple values`;
|
|
2036
|
+
d = ke(e, y, t);
|
|
2037
|
+
}
|
|
2038
|
+
return d;
|
|
2039
|
+
}
|
|
2040
|
+
function ht(e, i, y) {
|
|
2041
|
+
if (typeof i != "object" || i === null)
|
|
2042
|
+
return "object expected";
|
|
2043
|
+
if (y > ot)
|
|
2044
|
+
return "maximum nesting depth exceeded";
|
|
2045
|
+
const t = e.vfields;
|
|
2046
|
+
for (let d = 0; d < t.length; d++) {
|
|
2047
|
+
const v = t[d], o = i[v.name];
|
|
2048
|
+
if (v.required || o != null && Q.call(i, v.name)) {
|
|
2049
|
+
const l = v.plain ? pt(v, o) ? null : Y(v, v.exp) : or(v, i, o, y);
|
|
2050
|
+
if (l)
|
|
2051
|
+
return l;
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
return null;
|
|
2055
|
+
}
|
|
2056
|
+
const qe = P(2, ut, () => !0, "", void 0);
|
|
2057
|
+
function ir(e, i, y, t, d, v) {
|
|
2058
|
+
const o = t.keyType !== void 0, l = !o && t.rule === "repeated";
|
|
2059
|
+
let c = Q.call(ae, t.type) ? ae[t.type] : qe, f = null;
|
|
2060
|
+
if (c === qe) {
|
|
2061
|
+
const u = st(e.root, i.path, t.type.split("."), (m) => m === X || m === tt);
|
|
2062
|
+
if (!u)
|
|
2063
|
+
throw new Error(`no such Type or Enum '${t.type}' in Type ${i.full}`);
|
|
2064
|
+
if (u.kind === X) {
|
|
2065
|
+
if (u.node.group)
|
|
2066
|
+
throw new Error(`${t.type}: groups are not supported`);
|
|
2067
|
+
f = dt(e, u);
|
|
2068
|
+
} else {
|
|
2069
|
+
const m = u.node.values, b = Object.keys(m).map((h) => m[h]);
|
|
2070
|
+
c = P(0, (h) => et(typeof h == "string" ? Q.call(m, h) ? m[h] : b[0] : h), (h) => b.indexOf(h) >= 0, "enum value", b[0]);
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
const r = t.options && t.options.packed, n = l && !f && c.wt !== 2 && (r === void 0 ? i.packed : r === !0), a = o ? t.keyType : "";
|
|
2074
|
+
return {
|
|
2075
|
+
name: y,
|
|
2076
|
+
id: t.id,
|
|
2077
|
+
tag: (t.id << 3 | (o || f || n ? 2 : c.wt)) >>> 0,
|
|
2078
|
+
write: o ? er : f ? l ? Qt : Xt : l ? n ? Gt : Yt : Zt,
|
|
2079
|
+
put: c.put,
|
|
2080
|
+
ok: c.ok,
|
|
2081
|
+
vk: c.vk,
|
|
2082
|
+
exp: c.exp,
|
|
2083
|
+
required: t.rule === "required",
|
|
2084
|
+
repeated: l,
|
|
2085
|
+
def: l || o ? void 0 : c.def,
|
|
2086
|
+
child: f,
|
|
2087
|
+
owner: i,
|
|
2088
|
+
keyType: a,
|
|
2089
|
+
kre: a === "bool" ? nr : /64$/.test(a) ? rr : a && a !== "string" ? tr : null,
|
|
2090
|
+
kexp: a === "bool" ? "boolean key" : /64$/.test(a) ? "integer|Long key" : "integer key",
|
|
2091
|
+
ktag: o ? 8 | ae[a].wt : 0,
|
|
2092
|
+
kput: o ? ae[a].put : ut,
|
|
2093
|
+
vtag: 16 | (f ? 2 : c.wt),
|
|
2094
|
+
oneof: d,
|
|
2095
|
+
prior: v.slice(),
|
|
2096
|
+
plain: !o && !l && !f && !v.length
|
|
2097
|
+
};
|
|
2098
|
+
}
|
|
2099
|
+
function dt(e, i) {
|
|
2100
|
+
const y = i.path.join(".");
|
|
2101
|
+
let t = e.plans.get(y);
|
|
2102
|
+
if (t)
|
|
2103
|
+
return t;
|
|
2104
|
+
t = {
|
|
2105
|
+
path: i.path,
|
|
2106
|
+
full: `.${y}`,
|
|
2107
|
+
fields: [],
|
|
2108
|
+
vfields: [],
|
|
2109
|
+
packed: i.node.edition !== "proto2"
|
|
2110
|
+
}, e.plans.set(y, t);
|
|
2111
|
+
const d = i.node, v = /* @__PURE__ */ new Map(), o = d.oneofs || {};
|
|
2112
|
+
for (const c of Object.keys(o))
|
|
2113
|
+
for (const f of o[c].oneof || [])
|
|
2114
|
+
Q.call(d.fields, f) && !v.has(f) && v.set(f, c);
|
|
2115
|
+
const l = /* @__PURE__ */ new Map();
|
|
2116
|
+
for (const c of Object.keys(d.fields)) {
|
|
2117
|
+
const f = v.get(c) || "", r = l.get(f) || [], n = ir(e, t, c, d.fields[c], f, f ? r : []);
|
|
2118
|
+
f && (r.push(n), l.set(f, r)), t.vfields.push(n);
|
|
2119
|
+
}
|
|
2120
|
+
return t.fields = t.vfields.slice().sort((c, f) => c.id - f.id), t;
|
|
2121
|
+
}
|
|
2122
|
+
let ze, Je = "", Ve;
|
|
2123
|
+
function Le(e, i) {
|
|
2124
|
+
if (e === ze && i === Je)
|
|
2125
|
+
return Ve;
|
|
2126
|
+
let y = $e.get(e);
|
|
2127
|
+
y || (y = { root: e, plans: /* @__PURE__ */ new Map(), names: /* @__PURE__ */ new Map() }, $e.set(e, y));
|
|
2128
|
+
let t = y.names.get(i);
|
|
2129
|
+
if (!t) {
|
|
2130
|
+
const d = st(y.root, [], i.split("."), (v) => v === X);
|
|
2131
|
+
if (!d)
|
|
2132
|
+
throw new Error(`no such type: ${i}`);
|
|
2133
|
+
try {
|
|
2134
|
+
t = dt(y, d);
|
|
2135
|
+
} catch (v) {
|
|
2136
|
+
throw y.plans.clear(), v;
|
|
2137
|
+
}
|
|
2138
|
+
y.names.set(i, t);
|
|
2139
|
+
}
|
|
2140
|
+
return ze = e, Je = i, Ve = t, t;
|
|
2141
|
+
}
|
|
2142
|
+
function yt(e, i, y) {
|
|
2143
|
+
const t = Le(e, i), d = xt();
|
|
2144
|
+
try {
|
|
2145
|
+
return ft(t, y, 0), St(d);
|
|
2146
|
+
} finally {
|
|
2147
|
+
Nt(d);
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
function mt(e, i, y, t) {
|
|
2151
|
+
return ht(Le(e, i), y, 0);
|
|
2152
|
+
}
|
|
2153
|
+
function ar(e, i) {
|
|
2154
|
+
return Le(e, i).full;
|
|
2155
|
+
}
|
|
2156
|
+
let ue;
|
|
2157
|
+
function ur() {
|
|
2158
|
+
if (ue === void 0)
|
|
2159
|
+
try {
|
|
2160
|
+
ue = ce.util.codegen(["a"], "o11yEvalProbe")("return a === true")()(!0);
|
|
2161
|
+
} catch (e) {
|
|
2162
|
+
ue = !1;
|
|
2163
|
+
}
|
|
2164
|
+
return ue;
|
|
2165
|
+
}
|
|
2166
|
+
function Ee(e) {
|
|
2167
|
+
return !!e && !ur();
|
|
2168
|
+
}
|
|
2169
|
+
class lr {
|
|
2170
|
+
constructor() {
|
|
2171
|
+
this._typeStore = /* @__PURE__ */ new Map();
|
|
2172
|
+
}
|
|
2173
|
+
getSchemaType(i) {
|
|
2174
|
+
U.requireArgument(i, "schema");
|
|
2175
|
+
const y = z.getSchemaId(i);
|
|
2176
|
+
let t = this._typeStore.get(y);
|
|
2177
|
+
return t || (t = ce.Root.fromJSON(i.pbjsSchema).lookupType(y), this._typeStore.set(y, t)), t;
|
|
2178
|
+
}
|
|
2179
|
+
validate(i, y, t) {
|
|
2180
|
+
if (U.requireArgument(i, "schema"), U.requireArgument(y, "data"), Ee(t)) {
|
|
2181
|
+
const o = z.getSchemaId(i), l = mt(i.pbjsSchema, o, y);
|
|
2182
|
+
if (l)
|
|
2183
|
+
throw new Error(`Data is invalid for ${ar(i.pbjsSchema, o)}: ${l}`);
|
|
2184
|
+
return;
|
|
2185
|
+
}
|
|
2186
|
+
const d = this.getSchemaType(i), v = d.verify(y);
|
|
2187
|
+
if (v)
|
|
2188
|
+
throw new Error(`Data is invalid for ${d.fullName}: ${v}`);
|
|
2189
|
+
return d;
|
|
2190
|
+
}
|
|
2191
|
+
encode(i, y, t) {
|
|
2192
|
+
const d = this.validate(i, y, t);
|
|
2193
|
+
if (Ee(t))
|
|
2194
|
+
return yt(i.pbjsSchema, z.getSchemaId(i), y);
|
|
2195
|
+
const v = d.fromObject(y);
|
|
2196
|
+
return d.encode(v).finish();
|
|
2197
|
+
}
|
|
2198
|
+
encodePayload(i, y) {
|
|
2199
|
+
if (i != null && i.schema && i.payload)
|
|
2200
|
+
return {
|
|
2201
|
+
schemaName: z.getSchemaId(i.schema),
|
|
2202
|
+
payload: this.encode(i.schema, i.payload, y)
|
|
2203
|
+
};
|
|
2204
|
+
}
|
|
2205
|
+
getLogMessage(i, y, t, d) {
|
|
2206
|
+
return {
|
|
2207
|
+
timestamp: t.timestamp,
|
|
2208
|
+
data: this.encode(i, y, d),
|
|
2209
|
+
age: t.age,
|
|
2210
|
+
rootId: t.rootId,
|
|
2211
|
+
seq: t.sequence,
|
|
2212
|
+
sseq: t.schemaSequence,
|
|
2213
|
+
loggerName: t.loggerName,
|
|
2214
|
+
pagePayload: this.encodePayload(t.pagePayload, d),
|
|
2215
|
+
loggerAppName: t.loggerAppName,
|
|
2216
|
+
connectionType: t.connectionType,
|
|
2217
|
+
appPayload: this.encodePayload(t.appPayload, d),
|
|
2218
|
+
csId: t.clientSessionId,
|
|
2219
|
+
recCsId: t.receiverClientSessionId,
|
|
2220
|
+
recRootId: t.receiverRootId,
|
|
2221
|
+
tenantClass: t.tenantClass
|
|
2222
|
+
};
|
|
2223
|
+
}
|
|
2224
|
+
processRawLogMessage(i, y, t) {
|
|
2225
|
+
const d = y.data ? Object.assign({}, y.data) : {};
|
|
2226
|
+
return z.isInternal(i) && d.userPayload && (d.userPayload = this.encodePayload(d.userPayload, t)), Object.assign({}, y, {
|
|
2227
|
+
data: this.encode(i, d, t),
|
|
2228
|
+
pagePayload: this.encodePayload(y.pagePayload, t),
|
|
2229
|
+
appPayload: this.encodePayload(y.appPayload, t)
|
|
2230
|
+
});
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
const oe = new lr();
|
|
2234
|
+
let me;
|
|
2235
|
+
function cr() {
|
|
2236
|
+
return me || (me = ce.Root.fromJSON(Ye.pbjsSchema).lookupType("CoreEnvelope")), me;
|
|
2237
|
+
}
|
|
2238
|
+
function fr(e, i) {
|
|
2239
|
+
const y = Object.assign({}, e, {
|
|
2240
|
+
messages: /* @__PURE__ */ new Map()
|
|
2241
|
+
});
|
|
2242
|
+
return e.messages.forEach(function(t, d) {
|
|
2243
|
+
y.messages.set(d, t.map((v) => oe.processRawLogMessage(d, v, i)));
|
|
2244
|
+
}), y;
|
|
2245
|
+
}
|
|
2246
|
+
function je(e) {
|
|
2247
|
+
return G.buildFrom(e);
|
|
2248
|
+
}
|
|
2249
|
+
function Ae(e, i) {
|
|
2250
|
+
if (Ee(i)) {
|
|
2251
|
+
const v = Ye.pbjsSchema, o = mt(v, "CoreEnvelope", e);
|
|
2252
|
+
if (o)
|
|
2253
|
+
throw new Error(`Invalid CoreEnvelope: ${o}`);
|
|
2254
|
+
return yt(v, "CoreEnvelope", e);
|
|
2255
|
+
}
|
|
2256
|
+
const y = cr(), t = y.verify(e);
|
|
2257
|
+
if (t)
|
|
2258
|
+
throw new Error(`Invalid CoreEnvelope: ${t}`);
|
|
2259
|
+
return y.encode(e).finish();
|
|
2260
|
+
}
|
|
2261
|
+
function Ur(e, i) {
|
|
2262
|
+
const y = fr(e, i), t = je(y);
|
|
2263
|
+
return Ae(t, i);
|
|
2264
|
+
}
|
|
2265
|
+
function pr(e) {
|
|
2266
|
+
return !!e && typeof e == "object" && "envelopeContents" in e && "error" in e;
|
|
2267
|
+
}
|
|
2268
|
+
var q;
|
|
2269
|
+
(function(e) {
|
|
2270
|
+
e[e.fetchBinary = 0] = "fetchBinary", e[e.fetchFile = 1] = "fetchFile", e[e.noUpload = 2] = "noUpload";
|
|
2271
|
+
})(q || (q = {}));
|
|
2272
|
+
const hr = 3e4, dr = 1e3, yr = 500, Te = 2147483647, mr = /^[A-Za-z]{3}, \d{2} [A-Za-z]{3} \d{4} \d{2}:\d{2}:\d{2} GMT$/, gr = /^[A-Za-z]{6,9}, \d{2}-[A-Za-z]{3}-\d{2} \d{2}:\d{2}:\d{2} GMT$/, br = /^[A-Za-z]{3} [A-Za-z]{3} [ \d]\d \d{2}:\d{2}:\d{2} \d{4}$/, gt = 0.5;
|
|
2273
|
+
function bt() {
|
|
2274
|
+
try {
|
|
2275
|
+
const e = typeof globalThis == "object" ? globalThis : {}, i = e.crypto || e.msCrypto;
|
|
2276
|
+
if (i && typeof i.getRandomValues == "function")
|
|
2277
|
+
return i.getRandomValues(new Uint32Array(1))[0] / 4294967296;
|
|
2278
|
+
} catch (e) {
|
|
2279
|
+
}
|
|
2280
|
+
return gt;
|
|
2281
|
+
}
|
|
2282
|
+
function Ke(e) {
|
|
2283
|
+
const i = e();
|
|
2284
|
+
return Number.isFinite(i) && i >= 0 && i < 1 ? i : gt;
|
|
2285
|
+
}
|
|
2286
|
+
function vr(e, i = Date.now()) {
|
|
2287
|
+
if (!e)
|
|
2288
|
+
return;
|
|
2289
|
+
const y = e.trim();
|
|
2290
|
+
if (/^\d+$/.test(y))
|
|
2291
|
+
return Math.min(parseInt(y, 10) * 1e3, Te);
|
|
2292
|
+
const t = br.test(y);
|
|
2293
|
+
if (!t && !mr.test(y) && !gr.test(y))
|
|
2294
|
+
return;
|
|
2295
|
+
const d = Date.parse(t ? `${y} GMT` : y);
|
|
2296
|
+
if (!isNaN(d))
|
|
2297
|
+
return Math.min(Math.max(0, d - i), Te);
|
|
2298
|
+
}
|
|
2299
|
+
function wr(e, i, y = hr, t = bt) {
|
|
2300
|
+
const d = Math.min(y, Te), v = Math.min(d, 1e3 * Math.pow(2, e));
|
|
2301
|
+
if (i !== void 0) {
|
|
2302
|
+
if (i > d)
|
|
2303
|
+
return;
|
|
2304
|
+
const c = Math.max(i, v), f = Math.max(dr, c / 2), r = Math.min(d, c + f), n = Math.max(i, Math.min(c, r - f));
|
|
2305
|
+
return n + Math.floor(Ke(t) * (r - n));
|
|
2306
|
+
}
|
|
2307
|
+
const o = v / 2, l = Math.floor(o + Ke(t) * o);
|
|
2308
|
+
return Math.min(d, Math.max(yr, l));
|
|
2309
|
+
}
|
|
2310
|
+
const _r = 3, Or = 3e4, We = 10, se = 12e4, kr = 100, Er = 1e3, jr = 1024 * 1024;
|
|
2311
|
+
function xe(e) {
|
|
2312
|
+
e && typeof e.unref == "function" && e.unref();
|
|
2313
|
+
}
|
|
2314
|
+
class Ar {
|
|
2315
|
+
constructor(i, y) {
|
|
2316
|
+
if (this._owner = y, this.maxRetries = _r, this._maxRetryDelayMs = Or, this._throttledUntil = 0, this.random = bt, this.retryingUploads = 0, this._retrying = /* @__PURE__ */ new WeakSet(), this.drainingHeldBacklog = !1, this.drainChunkInFlight = !1, this._droppedMessagesCount = 0, i) {
|
|
2317
|
+
const t = i.maxRetries;
|
|
2318
|
+
if (t !== void 0) {
|
|
2319
|
+
if (typeof t != "number" || !Number.isInteger(t) || t < 0 || t > We)
|
|
2320
|
+
throw new Error(`options.maxRetries, if defined, must be an integer between 0 and ${We}`);
|
|
2321
|
+
this.maxRetries = t;
|
|
2322
|
+
}
|
|
2323
|
+
const d = i.maxRetryDelayMs;
|
|
2324
|
+
if (d !== void 0) {
|
|
2325
|
+
if (typeof d != "number" || !Number.isFinite(d) || d < 1 || d > se)
|
|
2326
|
+
throw new Error(`options.maxRetryDelayMs, if defined, must be a number >= 1 and <= ${se}`);
|
|
2327
|
+
this._maxRetryDelayMs = d;
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
get droppedMessagesCount() {
|
|
2332
|
+
return this._droppedMessagesCount;
|
|
2333
|
+
}
|
|
2334
|
+
isThrottled() {
|
|
2335
|
+
if (this.retryingUploads > 0)
|
|
2336
|
+
return !0;
|
|
2337
|
+
const i = this._throttledUntil - Date.now();
|
|
2338
|
+
return i > se ? (this._throttledUntil = 0, !1) : i > 0;
|
|
2339
|
+
}
|
|
2340
|
+
shouldDrop(i, y, t) {
|
|
2341
|
+
return (this.isThrottled() || this.drainingHeldBacklog && this.drainChunkInFlight) && this.isHeldBacklogFull(i(), y, t) ? (this._droppedMessagesCount++, !0) : !1;
|
|
2342
|
+
}
|
|
2343
|
+
isHeldBacklogFull(i, y, t) {
|
|
2344
|
+
return i >= Math.max(Er, kr * t) || y >= jr;
|
|
2345
|
+
}
|
|
2346
|
+
backoffBeforeRetry(i, y, t, d) {
|
|
2347
|
+
const v = t ? 0 : this.maxRetries, o = i.response.status;
|
|
2348
|
+
if (o !== 429 && o !== 503)
|
|
2349
|
+
return;
|
|
2350
|
+
const l = vr(i.response.headers ? i.response.headers.get("Retry-After") : void 0);
|
|
2351
|
+
if (o === 503 && l === void 0)
|
|
2352
|
+
return;
|
|
2353
|
+
const c = wr(y, l, this._maxRetryDelayMs, this.random), f = Math.min(c === void 0 ? l : c, se), r = Date.now() + f;
|
|
2354
|
+
if (this.drainingHeldBacklog = !0, r > this._throttledUntil && (this._throttledUntil = r, this._scheduleHoldFlush(f)), c === void 0 || y >= v)
|
|
2355
|
+
return;
|
|
2356
|
+
this._retrying.has(i) || (this._retrying.add(i), this.retryingUploads++);
|
|
2357
|
+
const n = Math.max(c, this._throttledUntil - Date.now()), a = i.response;
|
|
2358
|
+
return d ? this._sleepUntilHoldEnds(n, d).then(() => this._discardBody(a)) : (this._discardBody(a), this._sleepUntilHoldEnds(n, d));
|
|
2359
|
+
}
|
|
2360
|
+
endRetryChain(i) {
|
|
2361
|
+
this._retrying.delete(i) && (this.retryingUploads--, this.retryingUploads === 0 && (this._scheduleHoldFlush(0), this._owner.messagesCount() === 0 && !this.isThrottled() && (this.drainingHeldBacklog = !1)));
|
|
2362
|
+
}
|
|
2363
|
+
_scheduleHoldFlush(i) {
|
|
2364
|
+
this._holdTimerHandle !== void 0 && clearTimeout(this._holdTimerHandle), this._holdTimerHandle = setTimeout(() => {
|
|
2365
|
+
if (this._holdTimerHandle = void 0, this.isThrottled()) {
|
|
2366
|
+
const y = this._throttledUntil - Date.now();
|
|
2367
|
+
this.retryingUploads === 0 && y > 0 && this._scheduleHoldFlush(y);
|
|
2368
|
+
return;
|
|
2369
|
+
}
|
|
2370
|
+
this._owner.messagesCount() === 0 && (this.drainingHeldBacklog = !1), this._owner.hasData() && this._owner.flush();
|
|
2371
|
+
}, i), xe(this._holdTimerHandle);
|
|
2372
|
+
}
|
|
2373
|
+
_sleepUntilHoldEnds(i, y) {
|
|
2374
|
+
const t = Date.now() + i;
|
|
2375
|
+
return this._sleep(i, y).then(() => {
|
|
2376
|
+
const d = this._throttledUntil - t;
|
|
2377
|
+
return d > 0 && d <= se ? this._sleepUntilHoldEnds(this._throttledUntil - Date.now(), y) : void 0;
|
|
2378
|
+
});
|
|
2379
|
+
}
|
|
2380
|
+
_sleep(i, y) {
|
|
2381
|
+
return new Promise((t, d) => {
|
|
2382
|
+
if (y && y.aborted) {
|
|
2383
|
+
d(this._abortError(y));
|
|
2384
|
+
return;
|
|
2385
|
+
}
|
|
2386
|
+
const v = () => {
|
|
2387
|
+
clearTimeout(o), d(this._abortError(y));
|
|
2388
|
+
}, o = setTimeout(() => {
|
|
2389
|
+
y && y.removeEventListener("abort", v), t();
|
|
2390
|
+
}, i);
|
|
2391
|
+
xe(o), y && y.addEventListener("abort", v, { once: !0 });
|
|
2392
|
+
});
|
|
2393
|
+
}
|
|
2394
|
+
_discardBody(i) {
|
|
2395
|
+
Promise.resolve().then(() => {
|
|
2396
|
+
const y = i.body;
|
|
2397
|
+
return y && typeof y.cancel == "function" ? y.cancel() : void 0;
|
|
2398
|
+
}).catch(() => {
|
|
2399
|
+
});
|
|
2400
|
+
}
|
|
2401
|
+
_abortError(i) {
|
|
2402
|
+
return i.reason || Object.assign(new Error("The operation was aborted."), { name: "AbortError" });
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
const ge = "telemetry", Tr = 1e4, Ze = 1e4, xr = 10, Sr = 10, Ge = q.fetchBinary, Nr = 100, Cr = 256 * 1024, Rr = 64 * 1024, Ir = 6e4, Dr = 70, Lr = 112 + 2 * Dr;
|
|
2406
|
+
function Pr(e) {
|
|
2407
|
+
const i = e.replace(/\r\n|\r|\n/g, "%0D%0A").replace(/"/g, "%22");
|
|
2408
|
+
let y = 0;
|
|
2409
|
+
for (const t of i) {
|
|
2410
|
+
const d = t.codePointAt(0);
|
|
2411
|
+
y += d < 128 ? 1 : d < 2048 ? 2 : d < 65536 ? 3 : 4;
|
|
2412
|
+
}
|
|
2413
|
+
return y;
|
|
2414
|
+
}
|
|
2415
|
+
function be(e) {
|
|
2416
|
+
if (!pr(e))
|
|
2417
|
+
throw e;
|
|
2418
|
+
}
|
|
2419
|
+
class $r {
|
|
2420
|
+
constructor(i, y, t, d) {
|
|
2421
|
+
this._messagesLimit = xr, this._metricsLimit = Sr, this._formDataKey = ge, this._uploadInterval = Ze, this._messageSize = 0, this._evalFreeFallback = !1, this.uploadEndpoint = i, this.uploadMode = y == null ? Ge : y, t && (this._staticAttributes = {
|
|
2422
|
+
appName: t.appName,
|
|
2423
|
+
appVersion: t.appVersion,
|
|
2424
|
+
appExperience: t.appExperience,
|
|
2425
|
+
deviceId: t.deviceId,
|
|
2426
|
+
deviceModel: t.deviceModel,
|
|
2427
|
+
sdkVersion: t.sdkVersion
|
|
2428
|
+
});
|
|
2429
|
+
let v = Tr;
|
|
2430
|
+
if (d) {
|
|
2431
|
+
const o = d.maxUniqueSchemas;
|
|
2432
|
+
if (o !== void 0) {
|
|
2433
|
+
if (typeof o != "number" || !(o > 0))
|
|
2434
|
+
throw new Error("options.maxUniqueSchemas, if defined, must be > 0");
|
|
2435
|
+
v = o;
|
|
2436
|
+
}
|
|
2437
|
+
const l = d.messagesLimit;
|
|
2438
|
+
if (l !== void 0) {
|
|
2439
|
+
if (typeof l != "number" || !(l > 0))
|
|
2440
|
+
throw new Error("options.messagesLimit, if defined, must be > 0");
|
|
2441
|
+
this._messagesLimit = l;
|
|
2442
|
+
}
|
|
2443
|
+
const c = d.metricsLimit;
|
|
2444
|
+
if (c !== void 0) {
|
|
2445
|
+
if (typeof c != "number" || !(c > 0))
|
|
2446
|
+
throw new Error("options.metricsLimit, if defined, must be > 0");
|
|
2447
|
+
this._metricsLimit = c;
|
|
2448
|
+
}
|
|
2449
|
+
U.requireArgumentIfDefined(d.formDataKeyName, "options.formDataKeyName", "string") && (this._formDataKey = d.formDataKeyName), U.requireArgumentIfDefined(d.uploadFailedListener, "options.uploadFailedListener", "function") && (this._uploadFailedListener = d.uploadFailedListener), U.requireArgumentIfDefined(d.apiKey, "options.apiKey", "string") && (this._apiKey = d.apiKey), U.requireArgumentIfDefined(d.useEvalFreeEncoder, "options.useEvalFreeEncoder", "boolean") && (this._evalFreeFallback = d.useEvalFreeEncoder);
|
|
2450
|
+
}
|
|
2451
|
+
this._throttle = new Ar(d, {
|
|
2452
|
+
hasData: () => this.hasData,
|
|
2453
|
+
messagesCount: () => this.messagesCount,
|
|
2454
|
+
flush: () => this._upload().catch(be)
|
|
2455
|
+
}), this._messageBuffers = new Et(v), this._emptySize = this.getByteSize(1), this._restartTimer();
|
|
2456
|
+
}
|
|
2457
|
+
get uploadInterval() {
|
|
2458
|
+
return this._uploadInterval;
|
|
2459
|
+
}
|
|
2460
|
+
set uploadInterval(i) {
|
|
2461
|
+
if (i === void 0 && (i = Ze), typeof i != "number" || !(i > 0))
|
|
2462
|
+
throw new Error("uploadInterval, if defined, must be > 0");
|
|
2463
|
+
i !== this._uploadInterval && (this._uploadInterval = i, this._restartTimer());
|
|
2464
|
+
}
|
|
2465
|
+
get droppedMessagesCount() {
|
|
2466
|
+
return this._throttle.droppedMessagesCount;
|
|
2467
|
+
}
|
|
2468
|
+
get uploadEndpoint() {
|
|
2469
|
+
return this._uploadEndpoint;
|
|
2470
|
+
}
|
|
2471
|
+
set uploadEndpoint(i) {
|
|
2472
|
+
U.requireArgumentIfDefined(i, "uploadEndpoint", "string"), this._uploadEndpoint = i;
|
|
2473
|
+
}
|
|
2474
|
+
get uploadOptionsCallback() {
|
|
2475
|
+
return this._uploadOptionsCallback;
|
|
2476
|
+
}
|
|
2477
|
+
set uploadOptionsCallback(i) {
|
|
2478
|
+
U.requireArgumentIfDefined(i, "uploadOptionsCallback", "function"), this._uploadOptionsCallback = i;
|
|
2479
|
+
}
|
|
2480
|
+
get uploadMode() {
|
|
2481
|
+
return this._uploadMode;
|
|
2482
|
+
}
|
|
2483
|
+
set uploadMode(i) {
|
|
2484
|
+
if (U.requireArgumentIfDefined(i, "uploadMode", "number"), i === void 0 && (i = Ge), !(i in q))
|
|
2485
|
+
throw new Error(`Unsupported upload mode: ${i}`);
|
|
2486
|
+
this._uploadMode = i;
|
|
2487
|
+
}
|
|
2488
|
+
getByteSize(i) {
|
|
2489
|
+
return i >= 1 ? this._buildProtoEncodedCoreEnvelope(!1).byteLength : i >= 0.5 ? this._emptySize + this._messageSize + this.metricsCount * 8 : this._emptySize + this._messageSize;
|
|
2490
|
+
}
|
|
2491
|
+
_stopTimer() {
|
|
2492
|
+
this._intervalHandle !== void 0 && (clearInterval(this._intervalHandle), this._intervalHandle = void 0);
|
|
2493
|
+
}
|
|
2494
|
+
_restartTimer() {
|
|
2495
|
+
this._stopTimer(), this._intervalHandle = setInterval(() => {
|
|
2496
|
+
this.hasData && this._upload().catch(be);
|
|
2497
|
+
}, this._uploadInterval);
|
|
2498
|
+
}
|
|
2499
|
+
collect(i, y, t) {
|
|
2500
|
+
return Z(this, null, function* () {
|
|
2501
|
+
if (this._throttle.shouldDrop(() => this.messagesCount, this._messageSize, this._messagesLimit))
|
|
2502
|
+
return;
|
|
2503
|
+
z.isInternal(i) && y.userPayload && (y.userPayload = oe.encodePayload(y.userPayload, this._evalFreeFallback));
|
|
2504
|
+
const d = oe.getLogMessage(i, y, t, this._evalFreeFallback);
|
|
2505
|
+
if (!this._messageBuffers.push(i, d))
|
|
2506
|
+
throw new Error(`Buffer is full. Refusing schemaId ${z.getSchemaId(i)}`);
|
|
2507
|
+
if (this._messageSize += U.estimateObjectSize(d), this._shouldUpload())
|
|
2508
|
+
return this._upload();
|
|
2509
|
+
});
|
|
2510
|
+
}
|
|
2511
|
+
_shouldUpload() {
|
|
2512
|
+
return this._immediateUpload && this.hasData || this.messagesCount >= this._messagesLimit || this.metricsCount >= this._metricsLimit;
|
|
2513
|
+
}
|
|
2514
|
+
_upload(i) {
|
|
2515
|
+
return Z(this, null, function* () {
|
|
2516
|
+
if (!i && this._throttle.isThrottled() || (this._restartTimer(), !this._uploadEndpoint || this._uploadMode === q.noUpload))
|
|
2517
|
+
return;
|
|
2518
|
+
const y = !i && this._throttle.drainingHeldBacklog;
|
|
2519
|
+
if (y && this._throttle.drainChunkInFlight)
|
|
2520
|
+
return;
|
|
2521
|
+
const t = y ? this._getContentsOfCoreEnvelope(!0, !0) : this._getContentsOfCoreEnvelope(!0), d = this.messagesCount > 0;
|
|
2522
|
+
!d && !this._throttle.isThrottled() && (this._throttle.drainingHeldBacklog = !1);
|
|
2523
|
+
let v;
|
|
2524
|
+
y && (this._throttle.drainChunkInFlight = !0);
|
|
2525
|
+
try {
|
|
2526
|
+
v = yield this._uploadContents(t, i, y);
|
|
2527
|
+
} finally {
|
|
2528
|
+
y && (this._throttle.drainChunkInFlight = !1);
|
|
2529
|
+
}
|
|
2530
|
+
return y && d && this._drainRemaining(), v;
|
|
2531
|
+
});
|
|
2532
|
+
}
|
|
2533
|
+
_drainRemaining() {
|
|
2534
|
+
this.messagesCount > 0 && !this._throttle.isThrottled() && this._upload().catch(be);
|
|
2535
|
+
}
|
|
2536
|
+
_uploadContents(i, y, t = !1) {
|
|
2537
|
+
return Z(this, null, function* () {
|
|
2538
|
+
const { requestInit: d, bodyByteLength: v } = this._getRequestInit(i), o = {
|
|
2539
|
+
envelopeContents: i
|
|
2540
|
+
};
|
|
2541
|
+
try {
|
|
2542
|
+
let l;
|
|
2543
|
+
for (let c = 0; ; c++) {
|
|
2544
|
+
l = this._buildAttemptRequestInit(d, v), o.response = void 0, c > 0 && (o.attempts = c + 1), o.response = c > 0 || t ? yield this._fetchWithTimeout(l) : yield fetch(this._uploadEndpoint, l);
|
|
2545
|
+
const f = this._throttle.backoffBeforeRetry(o, c, y, l.signal);
|
|
2546
|
+
if (!f)
|
|
2547
|
+
break;
|
|
2548
|
+
yield f;
|
|
2549
|
+
}
|
|
2550
|
+
if (!o.response.ok)
|
|
2551
|
+
throw new Error("HTTP Not OK");
|
|
2552
|
+
return o;
|
|
2553
|
+
} catch (l) {
|
|
2554
|
+
if (o.error = l, !y && this._uploadFailedListener)
|
|
2555
|
+
try {
|
|
2556
|
+
this._uploadFailedListener(o);
|
|
2557
|
+
} catch (c) {
|
|
2558
|
+
}
|
|
2559
|
+
throw o;
|
|
2560
|
+
} finally {
|
|
2561
|
+
this._throttle.endRetryChain(o);
|
|
2562
|
+
}
|
|
2563
|
+
});
|
|
2564
|
+
}
|
|
2565
|
+
_buildAttemptRequestInit(i, y) {
|
|
2566
|
+
let t = i;
|
|
2567
|
+
if (this._apiKey && (t = ee(J({}, t), {
|
|
2568
|
+
headers: ee(J({}, t.headers), {
|
|
2569
|
+
"x-o11y-api-key": this._apiKey
|
|
2570
|
+
})
|
|
2571
|
+
})), this._uploadOptionsCallback) {
|
|
2572
|
+
const d = this._uploadOptionsCallback() || {}, v = J({}, d);
|
|
2573
|
+
if (d.headers && t.headers)
|
|
2574
|
+
if (d.headers instanceof Headers) {
|
|
2575
|
+
const o = new Headers(d.headers);
|
|
2576
|
+
for (const l in t.headers)
|
|
2577
|
+
Object.prototype.hasOwnProperty.call(t.headers, l) && o.set(l, t.headers[l]);
|
|
2578
|
+
v.headers = o;
|
|
2579
|
+
} else {
|
|
2580
|
+
if (Array.isArray(d.headers))
|
|
2581
|
+
throw new Error("Headers as array is not supported.");
|
|
2582
|
+
v.headers = J(J({}, d.headers), t.headers);
|
|
2583
|
+
}
|
|
2584
|
+
else t.headers && (v.headers = t.headers);
|
|
2585
|
+
v.method = t.method, v.body = t.body, t = v;
|
|
2586
|
+
}
|
|
2587
|
+
return t.keepalive && y > Rr && (t = ee(J({}, t), { keepalive: !1 })), t;
|
|
2588
|
+
}
|
|
2589
|
+
_fetchWithTimeout(i) {
|
|
2590
|
+
return Z(this, null, function* () {
|
|
2591
|
+
if (typeof AbortController != "function")
|
|
2592
|
+
return fetch(this._uploadEndpoint, i);
|
|
2593
|
+
const y = new AbortController(), t = i.signal, d = () => y.abort(t.reason);
|
|
2594
|
+
t && (t.aborted ? d() : t.addEventListener("abort", d, { once: !0 }));
|
|
2595
|
+
const v = setTimeout(() => y.abort(Object.assign(new Error("Upload request timed out."), { name: "TimeoutError" })), Ir);
|
|
2596
|
+
xe(v);
|
|
2597
|
+
try {
|
|
2598
|
+
return yield fetch(this._uploadEndpoint, ee(J({}, i), { signal: y.signal }));
|
|
2599
|
+
} finally {
|
|
2600
|
+
clearTimeout(v), t && t.removeEventListener("abort", d);
|
|
2601
|
+
}
|
|
2602
|
+
});
|
|
2603
|
+
}
|
|
2604
|
+
_getRequestInit(i) {
|
|
2605
|
+
const y = je(i), t = Ae(y, this._evalFreeFallback);
|
|
2606
|
+
let d;
|
|
2607
|
+
switch (this._uploadMode) {
|
|
2608
|
+
case q.fetchBinary:
|
|
2609
|
+
d = {
|
|
2610
|
+
method: "POST",
|
|
2611
|
+
headers: {
|
|
2612
|
+
"Content-Type": "application/octet-stream"
|
|
2613
|
+
},
|
|
2614
|
+
body: t
|
|
2615
|
+
};
|
|
2616
|
+
break;
|
|
2617
|
+
case void 0:
|
|
2618
|
+
case q.fetchFile:
|
|
2619
|
+
if (typeof FormData != "function")
|
|
2620
|
+
throw new Error("FormData is not a function in the global namespace.");
|
|
2621
|
+
const o = new FormData();
|
|
2622
|
+
o.append(this._formDataKey || ge, new Blob([t])), d = {
|
|
2623
|
+
method: "POST",
|
|
2624
|
+
body: o
|
|
2625
|
+
};
|
|
2626
|
+
break;
|
|
2627
|
+
case q.noUpload:
|
|
2628
|
+
default:
|
|
2629
|
+
throw new Error("Invalid uploadMode");
|
|
2630
|
+
}
|
|
2631
|
+
const v = t.byteLength + (this._uploadMode === q.fetchBinary ? 0 : Lr + Pr(this._formDataKey || ge));
|
|
2632
|
+
return { requestInit: d, bodyByteLength: v };
|
|
2633
|
+
}
|
|
2634
|
+
_checkUploadState() {
|
|
2635
|
+
if (this._uploadEndpoint === void 0)
|
|
2636
|
+
throw new Error("Upload endpoint is unset");
|
|
2637
|
+
if (this._uploadMode === q.noUpload)
|
|
2638
|
+
throw new Error("Upload mode is unset");
|
|
2639
|
+
}
|
|
2640
|
+
upload(i) {
|
|
2641
|
+
return Z(this, null, function* () {
|
|
2642
|
+
return this._checkUploadState(), U.requireArgumentIfDefined(i, "contents", "object") ? this._uploadContents(i, !0) : this.hasData ? this._upload(!0) : void 0;
|
|
2643
|
+
});
|
|
2644
|
+
}
|
|
2645
|
+
get hasData() {
|
|
2646
|
+
return this.messagesCount > 0 || this.metricsCount > 0;
|
|
2647
|
+
}
|
|
2648
|
+
get messagesCount() {
|
|
2649
|
+
return this._messageBuffers.totalItemCount;
|
|
2650
|
+
}
|
|
2651
|
+
get metricsCount() {
|
|
2652
|
+
let i = 0;
|
|
2653
|
+
return this._metricsExtractors && (i += this._metricsExtractors.getAllUpCounters().length || 0, i += this._metricsExtractors.getAllValueRecorders().length || 0, i += this._metricsExtractors.getAllBucketHistograms().length || 0), i;
|
|
2654
|
+
}
|
|
2655
|
+
getProtoEncodedCoreEnvelope() {
|
|
2656
|
+
return this._buildProtoEncodedCoreEnvelope(!0);
|
|
2657
|
+
}
|
|
2658
|
+
getContentsOfCoreEnvelope() {
|
|
2659
|
+
return this._getContentsOfCoreEnvelope(!0);
|
|
2660
|
+
}
|
|
2661
|
+
_getContentsOfCoreEnvelope(i, y = !1) {
|
|
2662
|
+
const t = {
|
|
2663
|
+
staticAttributes: this._staticAttributes,
|
|
2664
|
+
messages: i && y ? this._extractMessageChunk() : this._messageBuffers.getAllMessages(i)
|
|
2665
|
+
};
|
|
2666
|
+
return this._metricsExtractors && (t.upCounters = G.getUpCounters(this._metricsExtractors.getAllUpCounters(), i), t.valueRecorders = G.getValueRecorders(this._metricsExtractors.getAllValueRecorders(), i), t.bucketHistograms = G.getBucketHistograms(this._metricsExtractors.getAllBucketHistograms(), i)), i && !y && (this._messageSize = 0), t;
|
|
2667
|
+
}
|
|
2668
|
+
_extractMessageChunk() {
|
|
2669
|
+
const i = Math.max(this._messagesLimit, Nr), y = /* @__PURE__ */ new Map();
|
|
2670
|
+
let t = 0, d = 0, v = !1;
|
|
2671
|
+
for (const [o, l] of this._messageBuffers.getAllMessages(!1)) {
|
|
2672
|
+
let c = 0;
|
|
2673
|
+
for (; c < l.length; ) {
|
|
2674
|
+
const f = U.estimateObjectSize(l[c]);
|
|
2675
|
+
if (t > 0 && (t >= i || d + f > Cr)) {
|
|
2676
|
+
v = !0;
|
|
2677
|
+
break;
|
|
2678
|
+
}
|
|
2679
|
+
t++, d += f, c++;
|
|
2680
|
+
}
|
|
2681
|
+
if (c > 0 && y.set(o, l.splice(0, c)), v)
|
|
2682
|
+
break;
|
|
2683
|
+
}
|
|
2684
|
+
return this._messageSize = this.messagesCount === 0 ? 0 : Math.max(0, this._messageSize - d), y;
|
|
2685
|
+
}
|
|
2686
|
+
_buildProtoEncodedCoreEnvelope(i) {
|
|
2687
|
+
const y = this._getContentsOfCoreEnvelope(i), t = je(y);
|
|
2688
|
+
return Ae(t, this._evalFreeFallback);
|
|
2689
|
+
}
|
|
2690
|
+
receiveMetricsExtractors(i) {
|
|
2691
|
+
this._metricsExtractors = i;
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
2694
|
+
const Mr = 3e4;
|
|
2695
|
+
class Hr {
|
|
2696
|
+
constructor() {
|
|
2697
|
+
if (typeof __nimbus == "undefined")
|
|
2698
|
+
throw new Error("Nimbus is unavailable");
|
|
2699
|
+
if (!__nimbus.plugins || !__nimbus.plugins.observability)
|
|
2700
|
+
throw new Error("Observability plugin not found in Nimbus plugins");
|
|
2701
|
+
this._observability = __nimbus.plugins.observability, setInterval(() => {
|
|
2702
|
+
this._collectMetrics();
|
|
2703
|
+
}, Mr);
|
|
2704
|
+
}
|
|
2705
|
+
collect(i, y, t) {
|
|
2706
|
+
z.isInternal(i) && y.userPayload && (y.userPayload = oe.encodePayload(y.userPayload));
|
|
2707
|
+
const d = oe.getLogMessage(i, y, t), v = {
|
|
2708
|
+
timestamp: t.timestamp,
|
|
2709
|
+
rootId: t.rootId,
|
|
2710
|
+
sequence: t.sequence,
|
|
2711
|
+
schemaSequence: t.schemaSequence,
|
|
2712
|
+
loggerName: t.loggerName,
|
|
2713
|
+
pagePayload: d.pagePayload,
|
|
2714
|
+
loggerAppName: t.loggerAppName,
|
|
2715
|
+
connectionType: t.connectionType,
|
|
2716
|
+
appPayload: d.appPayload,
|
|
2717
|
+
clientSessionId: t.clientSessionId,
|
|
2718
|
+
age: t.age,
|
|
2719
|
+
receiverClientSessionId: t.receiverClientSessionId,
|
|
2720
|
+
receiverRootId: t.receiverRootId
|
|
2721
|
+
};
|
|
2722
|
+
this._observability.log(z.getSchemaId(i), d.data, v);
|
|
2723
|
+
}
|
|
2724
|
+
receiveMetricsExtractors(i) {
|
|
2725
|
+
this._metricsExtractors = i;
|
|
2726
|
+
}
|
|
2727
|
+
notifyIdleDetected(i) {
|
|
2728
|
+
this._observability.idleDetected(i);
|
|
2729
|
+
}
|
|
2730
|
+
_collectMetrics() {
|
|
2731
|
+
if (this._metricsExtractors) {
|
|
2732
|
+
const i = this._metricsExtractors.getAllUpCounters(), y = this._metricsExtractors.getAllValueRecorders(), t = this._metricsExtractors.getAllBucketHistograms(), d = [], v = [], o = [];
|
|
2733
|
+
for (const l of y) {
|
|
2734
|
+
const c = {
|
|
2735
|
+
name: l.getName(),
|
|
2736
|
+
createdTimestamp: l.getCreatedOn(),
|
|
2737
|
+
lastUpdatedTimestamp: l.getLastUpdatedOn(),
|
|
2738
|
+
values: l.getData(),
|
|
2739
|
+
ownerName: l.getOwnerName(),
|
|
2740
|
+
ownerAppName: l.getOwnerAppName(),
|
|
2741
|
+
tags: this._getMetricTags(l)
|
|
2742
|
+
};
|
|
2743
|
+
d.push(c), l.reset();
|
|
2744
|
+
}
|
|
2745
|
+
for (const l of i) {
|
|
2746
|
+
const c = {
|
|
2747
|
+
name: l.getName(),
|
|
2748
|
+
createdTimestamp: l.getCreatedOn(),
|
|
2749
|
+
lastUpdatedTimestamp: l.getLastUpdatedOn(),
|
|
2750
|
+
value: l.getData(),
|
|
2751
|
+
ownerName: l.getOwnerName(),
|
|
2752
|
+
ownerAppName: l.getOwnerAppName(),
|
|
2753
|
+
tags: this._getMetricTags(l)
|
|
2754
|
+
};
|
|
2755
|
+
v.push(c), l.reset();
|
|
2756
|
+
}
|
|
2757
|
+
for (const l of t) {
|
|
2758
|
+
const c = {
|
|
2759
|
+
name: l.getName(),
|
|
2760
|
+
createdTimestamp: l.getCreatedOn(),
|
|
2761
|
+
lastUpdatedTimestamp: l.getLastUpdatedOn(),
|
|
2762
|
+
values: l.getData(),
|
|
2763
|
+
buckets: l.getBuckets(),
|
|
2764
|
+
ownerName: l.getOwnerName(),
|
|
2765
|
+
ownerAppName: l.getOwnerAppName(),
|
|
2766
|
+
tags: this._getMetricTags(l)
|
|
2767
|
+
};
|
|
2768
|
+
o.push(c), l.reset();
|
|
2769
|
+
}
|
|
2770
|
+
if (d.length > 0 || v.length > 0) {
|
|
2771
|
+
const l = {
|
|
2772
|
+
upCounters: v,
|
|
2773
|
+
valueRecorders: d,
|
|
2774
|
+
bucketHistograms: o
|
|
2775
|
+
};
|
|
2776
|
+
this._observability.logMetrics(l);
|
|
2777
|
+
}
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
_getMetricTags(i) {
|
|
2781
|
+
const y = i.getTags();
|
|
2782
|
+
return y ? Object.entries(y).map((t) => ({
|
|
2783
|
+
name: t[0],
|
|
2784
|
+
value: t[1].toString()
|
|
2785
|
+
})) : [];
|
|
2786
|
+
}
|
|
2787
|
+
}
|
|
2788
|
+
export {
|
|
2789
|
+
$r as CoreCollector,
|
|
2790
|
+
Hr as HybridCollector,
|
|
2791
|
+
Ur as encodeCoreEnvelopeContentsRaw,
|
|
2792
|
+
fr as processRawContents
|
|
2793
|
+
};
|