@nil-/xit 0.1.16 → 0.1.18
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/assets/bundler.js +79 -78
- package/assets/index.js +754 -730
- package/assets/svelte/index.js +817 -770
- package/assets/svelte/internal/client.js +1033 -1080
- package/assets/svelte/motion.js +22 -19
- package/assets/svelte/store.js +44 -43
- package/index.d.ts +22 -24
- package/package.json +1 -1
package/assets/index.js
CHANGED
|
@@ -2,9 +2,9 @@ var P = (i) => {
|
|
|
2
2
|
throw TypeError(i);
|
|
3
3
|
};
|
|
4
4
|
var C = (i, e, n) => e.has(i) || P("Cannot " + n);
|
|
5
|
-
var w = (i, e, n) => (C(i, e, "read from private field"), n ? n.call(i) : e.get(i)), F = (i, e, n) => e.has(i) ? P("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, n),
|
|
5
|
+
var w = (i, e, n) => (C(i, e, "read from private field"), n ? n.call(i) : e.get(i)), F = (i, e, n) => e.has(i) ? P("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, n), S = (i, e, n, f) => (C(i, e, "write to private field"), f ? f.call(i, n) : e.set(i, n), n), W = (i, e, n) => (C(i, e, "access private method"), n);
|
|
6
6
|
import { w as writable, g as get } from "./svelte/store.js";
|
|
7
|
-
var j,
|
|
7
|
+
var j, I, x, M, D, L, N, $, U;
|
|
8
8
|
let Service$1 = (U = class {
|
|
9
9
|
constructor({ host: e, port: n }) {
|
|
10
10
|
F(this, j);
|
|
@@ -14,101 +14,109 @@ let Service$1 = (U = class {
|
|
|
14
14
|
F(this, D);
|
|
15
15
|
F(this, L);
|
|
16
16
|
F(this, N);
|
|
17
|
-
F(this,
|
|
18
|
-
|
|
17
|
+
F(this, $);
|
|
18
|
+
S(this, N, `${e ?? "localhost"}${n != null ? `:${n}` : ""}`), S(this, x, 0), S(this, M, null), S(this, D, null), S(this, L, null), S(this, $, null);
|
|
19
19
|
}
|
|
20
20
|
on_message(e) {
|
|
21
|
-
|
|
21
|
+
S(this, L, e);
|
|
22
22
|
}
|
|
23
23
|
on_connect(e) {
|
|
24
|
-
|
|
24
|
+
S(this, M, e);
|
|
25
25
|
}
|
|
26
26
|
on_disconnect(e) {
|
|
27
|
-
|
|
27
|
+
S(this, D, e);
|
|
28
28
|
}
|
|
29
29
|
// non-blocking (run is blocking in c++)
|
|
30
30
|
// calling it again should not do anything
|
|
31
31
|
start() {
|
|
32
|
-
w(this,
|
|
33
|
-
|
|
34
|
-
}, w(this,
|
|
35
|
-
w(this, x) === 1 && (w(this, D) && w(this, D).call(this, w(this, N)),
|
|
36
|
-
}, w(this,
|
|
37
|
-
w(this, x) !== 1 && w(this, x) !== 3 && (
|
|
38
|
-
}, w(this,
|
|
32
|
+
w(this, $) == null && w(this, x) !== 1 && w(this, x) !== 3 && (S(this, $, new WebSocket(`ws://${w(this, N)}`)), w(this, $).binaryType = "arraybuffer", w(this, $).onopen = () => {
|
|
33
|
+
S(this, x, 1), w(this, M) && w(this, M).call(this, w(this, N));
|
|
34
|
+
}, w(this, $).onclose = () => {
|
|
35
|
+
w(this, x) === 1 && (w(this, D) && w(this, D).call(this, w(this, N)), S(this, x, 2), W(this, j, I).call(this));
|
|
36
|
+
}, w(this, $).onerror = () => {
|
|
37
|
+
w(this, x) !== 1 && w(this, x) !== 3 && (S(this, x, 2), W(this, j, I).call(this));
|
|
38
|
+
}, w(this, $).onmessage = (e) => {
|
|
39
39
|
w(this, L) && w(this, L).call(this, w(this, N), new Uint8Array(e.data));
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
stop() {
|
|
43
|
-
|
|
43
|
+
S(this, x, 3), w(this, $) != null && (w(this, $).close(), S(this, $, null));
|
|
44
44
|
}
|
|
45
45
|
restart() {
|
|
46
|
-
|
|
46
|
+
S(this, x, 0);
|
|
47
47
|
}
|
|
48
48
|
publish(e) {
|
|
49
|
-
w(this,
|
|
49
|
+
w(this, $) != null && w(this, x) == 1 && w(this, $).send(e);
|
|
50
50
|
}
|
|
51
51
|
send(e, n) {
|
|
52
52
|
e === w(this, N) && this.publish(n);
|
|
53
53
|
}
|
|
54
|
-
}, j = new WeakSet(),
|
|
55
|
-
w(this,
|
|
56
|
-
}, x = new WeakMap(), M = new WeakMap(), D = new WeakMap(), L = new WeakMap(), N = new WeakMap(),
|
|
54
|
+
}, j = new WeakSet(), I = function() {
|
|
55
|
+
w(this, $) != null && (w(this, $).close(), S(this, $, null)), setTimeout(() => this.start(), 1e3);
|
|
56
|
+
}, x = new WeakMap(), M = new WeakMap(), D = new WeakMap(), L = new WeakMap(), N = new WeakMap(), $ = new WeakMap(), U);
|
|
57
57
|
const header = (i) => {
|
|
58
58
|
const e = new Uint8Array(4);
|
|
59
59
|
return new DataView(e.buffer).setUint32(0, i, !1), e;
|
|
60
60
|
}, concat = (i) => {
|
|
61
|
-
const e = new Uint8Array(i.reduce((
|
|
61
|
+
const e = new Uint8Array(i.reduce((f, u) => f + u.length, 0));
|
|
62
62
|
let n = 0;
|
|
63
|
-
for (const
|
|
64
|
-
e.set(
|
|
63
|
+
for (const f of i)
|
|
64
|
+
e.set(f, n), n += f.length;
|
|
65
65
|
return e;
|
|
66
66
|
}, test_connection = async (i) => new Promise((e, n) => {
|
|
67
|
-
const
|
|
68
|
-
|
|
67
|
+
const f = new Service$1(i), u = setTimeout(() => {
|
|
68
|
+
f.stop(), n("connection failed... stopping");
|
|
69
69
|
}, 2500);
|
|
70
|
-
|
|
71
|
-
console.log("connection tested... proceeding"), clearTimeout(
|
|
72
|
-
}),
|
|
73
|
-
}), service_fetch = async (i, e, n) => new Promise((
|
|
74
|
-
const
|
|
75
|
-
|
|
70
|
+
f.on_connect(() => {
|
|
71
|
+
console.log("connection tested... proceeding"), clearTimeout(u), f.stop(), e();
|
|
72
|
+
}), f.start();
|
|
73
|
+
}), service_fetch = async (i, e, n) => new Promise((f, u) => {
|
|
74
|
+
const a = new Service$1(i), t = setTimeout(() => {
|
|
75
|
+
a.stop(), u("timed out, cancelled");
|
|
76
76
|
}, 2500);
|
|
77
|
-
|
|
77
|
+
a.on_connect(() => a.publish(e)), a.on_message((s, o) => {
|
|
78
78
|
const r = new DataView(o.buffer).getUint32(0, !1), l = o.slice(4), d = n(r, l);
|
|
79
|
-
d != null && (clearTimeout(t),
|
|
80
|
-
}),
|
|
79
|
+
d != null && (clearTimeout(t), a.stop(), f(d));
|
|
80
|
+
}), a.start();
|
|
81
81
|
}), service_publish = (i, e) => {
|
|
82
|
-
const n = new Service$1(i),
|
|
82
|
+
const n = new Service$1(i), f = setTimeout(() => {
|
|
83
83
|
n.stop();
|
|
84
84
|
}, 2500);
|
|
85
85
|
n.on_connect(() => {
|
|
86
|
-
clearTimeout(
|
|
86
|
+
clearTimeout(f), n.publish(e), n.stop();
|
|
87
87
|
}), n.start();
|
|
88
88
|
};
|
|
89
|
+
function WorkerWrapper(i) {
|
|
90
|
+
return new Worker(
|
|
91
|
+
"/assets/bundler.js",
|
|
92
|
+
{
|
|
93
|
+
name: i == null ? void 0 : i.name
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
89
97
|
var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
90
98
|
function getDefaultExportFromCjs(i) {
|
|
91
99
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
92
100
|
}
|
|
93
101
|
var indexLight = { exports: {} }, indexMinimal = {}, minimal = {}, aspromise = asPromise$1;
|
|
94
102
|
function asPromise$1(i, e) {
|
|
95
|
-
for (var n = new Array(arguments.length - 1),
|
|
96
|
-
n[
|
|
103
|
+
for (var n = new Array(arguments.length - 1), f = 0, u = 2, a = !0; u < arguments.length; )
|
|
104
|
+
n[f++] = arguments[u++];
|
|
97
105
|
return new Promise(function(s, o) {
|
|
98
|
-
n[
|
|
99
|
-
if (
|
|
100
|
-
if (
|
|
106
|
+
n[f] = function(l) {
|
|
107
|
+
if (a)
|
|
108
|
+
if (a = !1, l)
|
|
101
109
|
o(l);
|
|
102
110
|
else {
|
|
103
|
-
for (var d = new Array(arguments.length - 1),
|
|
104
|
-
d[
|
|
111
|
+
for (var d = new Array(arguments.length - 1), h = 0; h < d.length; )
|
|
112
|
+
d[h++] = arguments[h];
|
|
105
113
|
s.apply(null, d);
|
|
106
114
|
}
|
|
107
115
|
};
|
|
108
116
|
try {
|
|
109
117
|
i.apply(e || null, n);
|
|
110
118
|
} catch (r) {
|
|
111
|
-
|
|
119
|
+
a && (a = !1, o(r));
|
|
112
120
|
}
|
|
113
121
|
});
|
|
114
122
|
}
|
|
@@ -123,51 +131,51 @@ var base64$1 = {};
|
|
|
123
131
|
++r;
|
|
124
132
|
return Math.ceil(s.length * 3) / 4 - r;
|
|
125
133
|
};
|
|
126
|
-
for (var n = new Array(64),
|
|
127
|
-
|
|
134
|
+
for (var n = new Array(64), f = new Array(123), u = 0; u < 64; )
|
|
135
|
+
f[n[u] = u < 26 ? u + 65 : u < 52 ? u + 71 : u < 62 ? u - 4 : u - 59 | 43] = u++;
|
|
128
136
|
e.encode = function(s, o, r) {
|
|
129
|
-
for (var l = null, d = [],
|
|
137
|
+
for (var l = null, d = [], h = 0, c = 0, p; o < r; ) {
|
|
130
138
|
var m = s[o++];
|
|
131
|
-
switch (
|
|
139
|
+
switch (c) {
|
|
132
140
|
case 0:
|
|
133
|
-
d[
|
|
141
|
+
d[h++] = n[m >> 2], p = (m & 3) << 4, c = 1;
|
|
134
142
|
break;
|
|
135
143
|
case 1:
|
|
136
|
-
d[
|
|
144
|
+
d[h++] = n[p | m >> 4], p = (m & 15) << 2, c = 2;
|
|
137
145
|
break;
|
|
138
146
|
case 2:
|
|
139
|
-
d[
|
|
147
|
+
d[h++] = n[p | m >> 6], d[h++] = n[m & 63], c = 0;
|
|
140
148
|
break;
|
|
141
149
|
}
|
|
142
|
-
|
|
150
|
+
h > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, d)), h = 0);
|
|
143
151
|
}
|
|
144
|
-
return
|
|
152
|
+
return c && (d[h++] = n[p], d[h++] = 61, c === 1 && (d[h++] = 61)), l ? (h && l.push(String.fromCharCode.apply(String, d.slice(0, h))), l.join("")) : String.fromCharCode.apply(String, d.slice(0, h));
|
|
145
153
|
};
|
|
146
|
-
var
|
|
154
|
+
var a = "invalid encoding";
|
|
147
155
|
e.decode = function(s, o, r) {
|
|
148
|
-
for (var l = r, d = 0,
|
|
149
|
-
var p = s.charCodeAt(
|
|
156
|
+
for (var l = r, d = 0, h, c = 0; c < s.length; ) {
|
|
157
|
+
var p = s.charCodeAt(c++);
|
|
150
158
|
if (p === 61 && d > 1)
|
|
151
159
|
break;
|
|
152
|
-
if ((p =
|
|
153
|
-
throw Error(
|
|
160
|
+
if ((p = f[p]) === void 0)
|
|
161
|
+
throw Error(a);
|
|
154
162
|
switch (d) {
|
|
155
163
|
case 0:
|
|
156
|
-
|
|
164
|
+
h = p, d = 1;
|
|
157
165
|
break;
|
|
158
166
|
case 1:
|
|
159
|
-
o[r++] =
|
|
167
|
+
o[r++] = h << 2 | (p & 48) >> 4, h = p, d = 2;
|
|
160
168
|
break;
|
|
161
169
|
case 2:
|
|
162
|
-
o[r++] = (
|
|
170
|
+
o[r++] = (h & 15) << 4 | (p & 60) >> 2, h = p, d = 3;
|
|
163
171
|
break;
|
|
164
172
|
case 3:
|
|
165
|
-
o[r++] = (
|
|
173
|
+
o[r++] = (h & 3) << 6 | p, d = 0;
|
|
166
174
|
break;
|
|
167
175
|
}
|
|
168
176
|
}
|
|
169
177
|
if (d === 1)
|
|
170
|
-
throw Error(
|
|
178
|
+
throw Error(a);
|
|
171
179
|
return r - l;
|
|
172
180
|
}, e.test = function(s) {
|
|
173
181
|
return /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(s);
|
|
@@ -177,10 +185,10 @@ var eventemitter = EventEmitter;
|
|
|
177
185
|
function EventEmitter() {
|
|
178
186
|
this._listeners = {};
|
|
179
187
|
}
|
|
180
|
-
EventEmitter.prototype.on = function(e, n,
|
|
188
|
+
EventEmitter.prototype.on = function(e, n, f) {
|
|
181
189
|
return (this._listeners[e] || (this._listeners[e] = [])).push({
|
|
182
190
|
fn: n,
|
|
183
|
-
ctx:
|
|
191
|
+
ctx: f || this
|
|
184
192
|
}), this;
|
|
185
193
|
};
|
|
186
194
|
EventEmitter.prototype.off = function(e, n) {
|
|
@@ -189,111 +197,111 @@ EventEmitter.prototype.off = function(e, n) {
|
|
|
189
197
|
else if (n === void 0)
|
|
190
198
|
this._listeners[e] = [];
|
|
191
199
|
else
|
|
192
|
-
for (var
|
|
193
|
-
|
|
200
|
+
for (var f = this._listeners[e], u = 0; u < f.length; )
|
|
201
|
+
f[u].fn === n ? f.splice(u, 1) : ++u;
|
|
194
202
|
return this;
|
|
195
203
|
};
|
|
196
204
|
EventEmitter.prototype.emit = function(e) {
|
|
197
205
|
var n = this._listeners[e];
|
|
198
206
|
if (n) {
|
|
199
|
-
for (var
|
|
200
|
-
|
|
201
|
-
for (
|
|
202
|
-
n[
|
|
207
|
+
for (var f = [], u = 1; u < arguments.length; )
|
|
208
|
+
f.push(arguments[u++]);
|
|
209
|
+
for (u = 0; u < n.length; )
|
|
210
|
+
n[u].fn.apply(n[u++].ctx, f);
|
|
203
211
|
}
|
|
204
212
|
return this;
|
|
205
213
|
};
|
|
206
214
|
var float = factory(factory);
|
|
207
215
|
function factory(i) {
|
|
208
216
|
return typeof Float32Array < "u" ? function() {
|
|
209
|
-
var e = new Float32Array([-0]), n = new Uint8Array(e.buffer),
|
|
210
|
-
function
|
|
217
|
+
var e = new Float32Array([-0]), n = new Uint8Array(e.buffer), f = n[3] === 128;
|
|
218
|
+
function u(o, r, l) {
|
|
211
219
|
e[0] = o, r[l] = n[0], r[l + 1] = n[1], r[l + 2] = n[2], r[l + 3] = n[3];
|
|
212
220
|
}
|
|
213
|
-
function
|
|
221
|
+
function a(o, r, l) {
|
|
214
222
|
e[0] = o, r[l] = n[3], r[l + 1] = n[2], r[l + 2] = n[1], r[l + 3] = n[0];
|
|
215
223
|
}
|
|
216
|
-
i.writeFloatLE =
|
|
224
|
+
i.writeFloatLE = f ? u : a, i.writeFloatBE = f ? a : u;
|
|
217
225
|
function t(o, r) {
|
|
218
226
|
return n[0] = o[r], n[1] = o[r + 1], n[2] = o[r + 2], n[3] = o[r + 3], e[0];
|
|
219
227
|
}
|
|
220
228
|
function s(o, r) {
|
|
221
229
|
return n[3] = o[r], n[2] = o[r + 1], n[1] = o[r + 2], n[0] = o[r + 3], e[0];
|
|
222
230
|
}
|
|
223
|
-
i.readFloatLE =
|
|
231
|
+
i.readFloatLE = f ? t : s, i.readFloatBE = f ? s : t;
|
|
224
232
|
}() : function() {
|
|
225
|
-
function e(
|
|
226
|
-
var s =
|
|
227
|
-
if (s && (
|
|
228
|
-
|
|
233
|
+
function e(f, u, a, t) {
|
|
234
|
+
var s = u < 0 ? 1 : 0;
|
|
235
|
+
if (s && (u = -u), u === 0)
|
|
236
|
+
f(1 / u > 0 ? (
|
|
229
237
|
/* positive */
|
|
230
238
|
0
|
|
231
239
|
) : (
|
|
232
240
|
/* negative 0 */
|
|
233
241
|
2147483648
|
|
234
|
-
),
|
|
235
|
-
else if (isNaN(
|
|
236
|
-
|
|
237
|
-
else if (
|
|
238
|
-
|
|
239
|
-
else if (
|
|
240
|
-
|
|
242
|
+
), a, t);
|
|
243
|
+
else if (isNaN(u))
|
|
244
|
+
f(2143289344, a, t);
|
|
245
|
+
else if (u > 34028234663852886e22)
|
|
246
|
+
f((s << 31 | 2139095040) >>> 0, a, t);
|
|
247
|
+
else if (u < 11754943508222875e-54)
|
|
248
|
+
f((s << 31 | Math.round(u / 1401298464324817e-60)) >>> 0, a, t);
|
|
241
249
|
else {
|
|
242
|
-
var o = Math.floor(Math.log(
|
|
243
|
-
|
|
250
|
+
var o = Math.floor(Math.log(u) / Math.LN2), r = Math.round(u * Math.pow(2, -o) * 8388608) & 8388607;
|
|
251
|
+
f((s << 31 | o + 127 << 23 | r) >>> 0, a, t);
|
|
244
252
|
}
|
|
245
253
|
}
|
|
246
254
|
i.writeFloatLE = e.bind(null, writeUintLE), i.writeFloatBE = e.bind(null, writeUintBE);
|
|
247
|
-
function n(
|
|
248
|
-
var t =
|
|
255
|
+
function n(f, u, a) {
|
|
256
|
+
var t = f(u, a), s = (t >> 31) * 2 + 1, o = t >>> 23 & 255, r = t & 8388607;
|
|
249
257
|
return o === 255 ? r ? NaN : s * (1 / 0) : o === 0 ? s * 1401298464324817e-60 * r : s * Math.pow(2, o - 150) * (r + 8388608);
|
|
250
258
|
}
|
|
251
259
|
i.readFloatLE = n.bind(null, readUintLE), i.readFloatBE = n.bind(null, readUintBE);
|
|
252
260
|
}(), typeof Float64Array < "u" ? function() {
|
|
253
|
-
var e = new Float64Array([-0]), n = new Uint8Array(e.buffer),
|
|
254
|
-
function
|
|
261
|
+
var e = new Float64Array([-0]), n = new Uint8Array(e.buffer), f = n[7] === 128;
|
|
262
|
+
function u(o, r, l) {
|
|
255
263
|
e[0] = o, r[l] = n[0], r[l + 1] = n[1], r[l + 2] = n[2], r[l + 3] = n[3], r[l + 4] = n[4], r[l + 5] = n[5], r[l + 6] = n[6], r[l + 7] = n[7];
|
|
256
264
|
}
|
|
257
|
-
function
|
|
265
|
+
function a(o, r, l) {
|
|
258
266
|
e[0] = o, r[l] = n[7], r[l + 1] = n[6], r[l + 2] = n[5], r[l + 3] = n[4], r[l + 4] = n[3], r[l + 5] = n[2], r[l + 6] = n[1], r[l + 7] = n[0];
|
|
259
267
|
}
|
|
260
|
-
i.writeDoubleLE =
|
|
268
|
+
i.writeDoubleLE = f ? u : a, i.writeDoubleBE = f ? a : u;
|
|
261
269
|
function t(o, r) {
|
|
262
270
|
return n[0] = o[r], n[1] = o[r + 1], n[2] = o[r + 2], n[3] = o[r + 3], n[4] = o[r + 4], n[5] = o[r + 5], n[6] = o[r + 6], n[7] = o[r + 7], e[0];
|
|
263
271
|
}
|
|
264
272
|
function s(o, r) {
|
|
265
273
|
return n[7] = o[r], n[6] = o[r + 1], n[5] = o[r + 2], n[4] = o[r + 3], n[3] = o[r + 4], n[2] = o[r + 5], n[1] = o[r + 6], n[0] = o[r + 7], e[0];
|
|
266
274
|
}
|
|
267
|
-
i.readDoubleLE =
|
|
275
|
+
i.readDoubleLE = f ? t : s, i.readDoubleBE = f ? s : t;
|
|
268
276
|
}() : function() {
|
|
269
|
-
function e(
|
|
277
|
+
function e(f, u, a, t, s, o) {
|
|
270
278
|
var r = t < 0 ? 1 : 0;
|
|
271
279
|
if (r && (t = -t), t === 0)
|
|
272
|
-
|
|
280
|
+
f(0, s, o + u), f(1 / t > 0 ? (
|
|
273
281
|
/* positive */
|
|
274
282
|
0
|
|
275
283
|
) : (
|
|
276
284
|
/* negative 0 */
|
|
277
285
|
2147483648
|
|
278
|
-
), s, o +
|
|
286
|
+
), s, o + a);
|
|
279
287
|
else if (isNaN(t))
|
|
280
|
-
|
|
288
|
+
f(0, s, o + u), f(2146959360, s, o + a);
|
|
281
289
|
else if (t > 17976931348623157e292)
|
|
282
|
-
|
|
290
|
+
f(0, s, o + u), f((r << 31 | 2146435072) >>> 0, s, o + a);
|
|
283
291
|
else {
|
|
284
292
|
var l;
|
|
285
293
|
if (t < 22250738585072014e-324)
|
|
286
|
-
l = t / 5e-324,
|
|
294
|
+
l = t / 5e-324, f(l >>> 0, s, o + u), f((r << 31 | l / 4294967296) >>> 0, s, o + a);
|
|
287
295
|
else {
|
|
288
296
|
var d = Math.floor(Math.log(t) / Math.LN2);
|
|
289
|
-
d === 1024 && (d = 1023), l = t * Math.pow(2, -d),
|
|
297
|
+
d === 1024 && (d = 1023), l = t * Math.pow(2, -d), f(l * 4503599627370496 >>> 0, s, o + u), f((r << 31 | d + 1023 << 20 | l * 1048576 & 1048575) >>> 0, s, o + a);
|
|
290
298
|
}
|
|
291
299
|
}
|
|
292
300
|
}
|
|
293
301
|
i.writeDoubleLE = e.bind(null, writeUintLE, 0, 4), i.writeDoubleBE = e.bind(null, writeUintBE, 4, 0);
|
|
294
|
-
function n(
|
|
295
|
-
var o =
|
|
296
|
-
return d === 2047 ?
|
|
302
|
+
function n(f, u, a, t, s) {
|
|
303
|
+
var o = f(t, s + u), r = f(t, s + a), l = (r >> 31) * 2 + 1, d = r >>> 20 & 2047, h = 4294967296 * (r & 1048575) + o;
|
|
304
|
+
return d === 2047 ? h ? NaN : l * (1 / 0) : d === 0 ? l * 5e-324 * h : l * Math.pow(2, d - 1075) * (h + 4503599627370496);
|
|
297
305
|
}
|
|
298
306
|
i.readDoubleLE = n.bind(null, readUintLE, 0, 4), i.readDoubleBE = n.bind(null, readUintBE, 4, 0);
|
|
299
307
|
}(), i;
|
|
@@ -323,31 +331,31 @@ function inquire$1(moduleName) {
|
|
|
323
331
|
var utf8$2 = {};
|
|
324
332
|
(function(i) {
|
|
325
333
|
var e = i;
|
|
326
|
-
e.length = function(
|
|
327
|
-
for (var
|
|
328
|
-
|
|
329
|
-
return
|
|
330
|
-
}, e.read = function(
|
|
331
|
-
var t =
|
|
334
|
+
e.length = function(f) {
|
|
335
|
+
for (var u = 0, a = 0, t = 0; t < f.length; ++t)
|
|
336
|
+
a = f.charCodeAt(t), a < 128 ? u += 1 : a < 2048 ? u += 2 : (a & 64512) === 55296 && (f.charCodeAt(t + 1) & 64512) === 56320 ? (++t, u += 4) : u += 3;
|
|
337
|
+
return u;
|
|
338
|
+
}, e.read = function(f, u, a) {
|
|
339
|
+
var t = a - u;
|
|
332
340
|
if (t < 1)
|
|
333
341
|
return "";
|
|
334
|
-
for (var s = null, o = [], r = 0, l;
|
|
335
|
-
l =
|
|
342
|
+
for (var s = null, o = [], r = 0, l; u < a; )
|
|
343
|
+
l = f[u++], l < 128 ? o[r++] = l : l > 191 && l < 224 ? o[r++] = (l & 31) << 6 | f[u++] & 63 : l > 239 && l < 365 ? (l = ((l & 7) << 18 | (f[u++] & 63) << 12 | (f[u++] & 63) << 6 | f[u++] & 63) - 65536, o[r++] = 55296 + (l >> 10), o[r++] = 56320 + (l & 1023)) : o[r++] = (l & 15) << 12 | (f[u++] & 63) << 6 | f[u++] & 63, r > 8191 && ((s || (s = [])).push(String.fromCharCode.apply(String, o)), r = 0);
|
|
336
344
|
return s ? (r && s.push(String.fromCharCode.apply(String, o.slice(0, r))), s.join("")) : String.fromCharCode.apply(String, o.slice(0, r));
|
|
337
|
-
}, e.write = function(
|
|
338
|
-
for (var t =
|
|
339
|
-
s =
|
|
340
|
-
return
|
|
345
|
+
}, e.write = function(f, u, a) {
|
|
346
|
+
for (var t = a, s, o, r = 0; r < f.length; ++r)
|
|
347
|
+
s = f.charCodeAt(r), s < 128 ? u[a++] = s : s < 2048 ? (u[a++] = s >> 6 | 192, u[a++] = s & 63 | 128) : (s & 64512) === 55296 && ((o = f.charCodeAt(r + 1)) & 64512) === 56320 ? (s = 65536 + ((s & 1023) << 10) + (o & 1023), ++r, u[a++] = s >> 18 | 240, u[a++] = s >> 12 & 63 | 128, u[a++] = s >> 6 & 63 | 128, u[a++] = s & 63 | 128) : (u[a++] = s >> 12 | 224, u[a++] = s >> 6 & 63 | 128, u[a++] = s & 63 | 128);
|
|
348
|
+
return a - t;
|
|
341
349
|
};
|
|
342
350
|
})(utf8$2);
|
|
343
351
|
var pool_1 = pool;
|
|
344
352
|
function pool(i, e, n) {
|
|
345
|
-
var
|
|
353
|
+
var f = n || 8192, u = f >>> 1, a = null, t = f;
|
|
346
354
|
return function(o) {
|
|
347
|
-
if (o < 1 || o >
|
|
355
|
+
if (o < 1 || o > u)
|
|
348
356
|
return i(o);
|
|
349
|
-
t + o >
|
|
350
|
-
var r = e.call(
|
|
357
|
+
t + o > f && (a = i(f), t = 0);
|
|
358
|
+
var r = e.call(a, t, t += o);
|
|
351
359
|
return t & 7 && (t = (t | 7) + 1), r;
|
|
352
360
|
};
|
|
353
361
|
}
|
|
@@ -356,8 +364,8 @@ function requireLongbits() {
|
|
|
356
364
|
if (hasRequiredLongbits) return longbits;
|
|
357
365
|
hasRequiredLongbits = 1, longbits = e;
|
|
358
366
|
var i = requireMinimal();
|
|
359
|
-
function e(
|
|
360
|
-
this.lo =
|
|
367
|
+
function e(a, t) {
|
|
368
|
+
this.lo = a >>> 0, this.hi = t >>> 0;
|
|
361
369
|
}
|
|
362
370
|
var n = e.zero = new e(0, 0);
|
|
363
371
|
n.toNumber = function() {
|
|
@@ -367,7 +375,7 @@ function requireLongbits() {
|
|
|
367
375
|
}, n.length = function() {
|
|
368
376
|
return 1;
|
|
369
377
|
};
|
|
370
|
-
var
|
|
378
|
+
var f = e.zeroHash = "\0\0\0\0\0\0\0\0";
|
|
371
379
|
e.fromNumber = function(t) {
|
|
372
380
|
if (t === 0)
|
|
373
381
|
return n;
|
|
@@ -393,11 +401,11 @@ function requireLongbits() {
|
|
|
393
401
|
}, e.prototype.toLong = function(t) {
|
|
394
402
|
return i.Long ? new i.Long(this.lo | 0, this.hi | 0, !!t) : { low: this.lo | 0, high: this.hi | 0, unsigned: !!t };
|
|
395
403
|
};
|
|
396
|
-
var
|
|
404
|
+
var u = String.prototype.charCodeAt;
|
|
397
405
|
return e.fromHash = function(t) {
|
|
398
|
-
return t ===
|
|
399
|
-
(
|
|
400
|
-
(
|
|
406
|
+
return t === f ? n : new e(
|
|
407
|
+
(u.call(t, 0) | u.call(t, 1) << 8 | u.call(t, 2) << 16 | u.call(t, 3) << 24) >>> 0,
|
|
408
|
+
(u.call(t, 4) | u.call(t, 5) << 8 | u.call(t, 6) << 16 | u.call(t, 7) << 24) >>> 0
|
|
401
409
|
);
|
|
402
410
|
}, e.prototype.toHash = function() {
|
|
403
411
|
return String.fromCharCode(
|
|
@@ -432,68 +440,68 @@ function requireMinimal() {
|
|
|
432
440
|
/* istanbul ignore next */
|
|
433
441
|
{}
|
|
434
442
|
), e.isInteger = Number.isInteger || /* istanbul ignore next */
|
|
435
|
-
function(
|
|
436
|
-
return typeof
|
|
437
|
-
}, e.isString = function(
|
|
438
|
-
return typeof
|
|
439
|
-
}, e.isObject = function(
|
|
440
|
-
return
|
|
443
|
+
function(a) {
|
|
444
|
+
return typeof a == "number" && isFinite(a) && Math.floor(a) === a;
|
|
445
|
+
}, e.isString = function(a) {
|
|
446
|
+
return typeof a == "string" || a instanceof String;
|
|
447
|
+
}, e.isObject = function(a) {
|
|
448
|
+
return a && typeof a == "object";
|
|
441
449
|
}, e.isset = /**
|
|
442
450
|
* Checks if a property on a message is considered to be present.
|
|
443
451
|
* @param {Object} obj Plain object or message instance
|
|
444
452
|
* @param {string} prop Property name
|
|
445
453
|
* @returns {boolean} `true` if considered to be present, otherwise `false`
|
|
446
454
|
*/
|
|
447
|
-
e.isSet = function(
|
|
448
|
-
var s =
|
|
449
|
-
return s != null &&
|
|
455
|
+
e.isSet = function(a, t) {
|
|
456
|
+
var s = a[t];
|
|
457
|
+
return s != null && a.hasOwnProperty(t) ? typeof s != "object" || (Array.isArray(s) ? s.length : Object.keys(s).length) > 0 : !1;
|
|
450
458
|
}, e.Buffer = function() {
|
|
451
459
|
try {
|
|
452
|
-
var
|
|
453
|
-
return
|
|
460
|
+
var u = e.inquire("buffer").Buffer;
|
|
461
|
+
return u.prototype.utf8Write ? u : (
|
|
454
462
|
/* istanbul ignore next */
|
|
455
463
|
null
|
|
456
464
|
);
|
|
457
465
|
} catch {
|
|
458
466
|
return null;
|
|
459
467
|
}
|
|
460
|
-
}(), e._Buffer_from = null, e._Buffer_allocUnsafe = null, e.newBuffer = function(
|
|
461
|
-
return typeof
|
|
468
|
+
}(), e._Buffer_from = null, e._Buffer_allocUnsafe = null, e.newBuffer = function(a) {
|
|
469
|
+
return typeof a == "number" ? e.Buffer ? e._Buffer_allocUnsafe(a) : new e.Array(a) : e.Buffer ? e._Buffer_from(a) : typeof Uint8Array > "u" ? a : new Uint8Array(a);
|
|
462
470
|
}, e.Array = typeof Uint8Array < "u" ? Uint8Array : Array, e.Long = /* istanbul ignore next */
|
|
463
471
|
e.global.dcodeIO && /* istanbul ignore next */
|
|
464
472
|
e.global.dcodeIO.Long || /* istanbul ignore next */
|
|
465
|
-
e.global.Long || e.inquire("long"), e.key2Re = /^true|false|0|1$/, e.key32Re = /^-?(?:0|[1-9][0-9]*)$/, e.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, e.longToHash = function(
|
|
466
|
-
return
|
|
467
|
-
}, e.longFromHash = function(
|
|
468
|
-
var s = e.LongBits.fromHash(
|
|
473
|
+
e.global.Long || e.inquire("long"), e.key2Re = /^true|false|0|1$/, e.key32Re = /^-?(?:0|[1-9][0-9]*)$/, e.key64Re = /^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/, e.longToHash = function(a) {
|
|
474
|
+
return a ? e.LongBits.from(a).toHash() : e.LongBits.zeroHash;
|
|
475
|
+
}, e.longFromHash = function(a, t) {
|
|
476
|
+
var s = e.LongBits.fromHash(a);
|
|
469
477
|
return e.Long ? e.Long.fromBits(s.lo, s.hi, t) : s.toNumber(!!t);
|
|
470
478
|
};
|
|
471
|
-
function n(
|
|
472
|
-
for (var s = Object.keys(
|
|
473
|
-
(
|
|
474
|
-
return
|
|
479
|
+
function n(u, a, t) {
|
|
480
|
+
for (var s = Object.keys(a), o = 0; o < s.length; ++o)
|
|
481
|
+
(u[s[o]] === void 0 || !t) && (u[s[o]] = a[s[o]]);
|
|
482
|
+
return u;
|
|
475
483
|
}
|
|
476
|
-
e.merge = n, e.lcFirst = function(
|
|
477
|
-
return
|
|
484
|
+
e.merge = n, e.lcFirst = function(a) {
|
|
485
|
+
return a.charAt(0).toLowerCase() + a.substring(1);
|
|
478
486
|
};
|
|
479
|
-
function
|
|
480
|
-
function
|
|
481
|
-
if (!(this instanceof
|
|
482
|
-
return new
|
|
487
|
+
function f(u) {
|
|
488
|
+
function a(t, s) {
|
|
489
|
+
if (!(this instanceof a))
|
|
490
|
+
return new a(t, s);
|
|
483
491
|
Object.defineProperty(this, "message", { get: function() {
|
|
484
492
|
return t;
|
|
485
|
-
} }), Error.captureStackTrace ? Error.captureStackTrace(this,
|
|
493
|
+
} }), Error.captureStackTrace ? Error.captureStackTrace(this, a) : Object.defineProperty(this, "stack", { value: new Error().stack || "" }), s && n(this, s);
|
|
486
494
|
}
|
|
487
|
-
return
|
|
495
|
+
return a.prototype = Object.create(Error.prototype, {
|
|
488
496
|
constructor: {
|
|
489
|
-
value:
|
|
497
|
+
value: a,
|
|
490
498
|
writable: !0,
|
|
491
499
|
enumerable: !1,
|
|
492
500
|
configurable: !0
|
|
493
501
|
},
|
|
494
502
|
name: {
|
|
495
503
|
get: function() {
|
|
496
|
-
return
|
|
504
|
+
return u;
|
|
497
505
|
},
|
|
498
506
|
set: void 0,
|
|
499
507
|
enumerable: !1,
|
|
@@ -511,20 +519,20 @@ function requireMinimal() {
|
|
|
511
519
|
enumerable: !1,
|
|
512
520
|
configurable: !0
|
|
513
521
|
}
|
|
514
|
-
}),
|
|
522
|
+
}), a;
|
|
515
523
|
}
|
|
516
|
-
e.newError =
|
|
517
|
-
for (var t = {}, s = 0; s <
|
|
518
|
-
t[
|
|
524
|
+
e.newError = f, e.ProtocolError = f("ProtocolError"), e.oneOfGetter = function(a) {
|
|
525
|
+
for (var t = {}, s = 0; s < a.length; ++s)
|
|
526
|
+
t[a[s]] = 1;
|
|
519
527
|
return function() {
|
|
520
528
|
for (var o = Object.keys(this), r = o.length - 1; r > -1; --r)
|
|
521
529
|
if (t[o[r]] === 1 && this[o[r]] !== void 0 && this[o[r]] !== null)
|
|
522
530
|
return o[r];
|
|
523
531
|
};
|
|
524
|
-
}, e.oneOfSetter = function(
|
|
532
|
+
}, e.oneOfSetter = function(a) {
|
|
525
533
|
return function(t) {
|
|
526
|
-
for (var s = 0; s <
|
|
527
|
-
|
|
534
|
+
for (var s = 0; s < a.length; ++s)
|
|
535
|
+
a[s] !== t && delete this[a[s]];
|
|
528
536
|
};
|
|
529
537
|
}, e.toJSONOptions = {
|
|
530
538
|
longs: String,
|
|
@@ -532,17 +540,17 @@ function requireMinimal() {
|
|
|
532
540
|
bytes: String,
|
|
533
541
|
json: !0
|
|
534
542
|
}, e._configure = function() {
|
|
535
|
-
var
|
|
536
|
-
if (!
|
|
543
|
+
var u = e.Buffer;
|
|
544
|
+
if (!u) {
|
|
537
545
|
e._Buffer_from = e._Buffer_allocUnsafe = null;
|
|
538
546
|
return;
|
|
539
547
|
}
|
|
540
|
-
e._Buffer_from =
|
|
548
|
+
e._Buffer_from = u.from !== Uint8Array.from && u.from || /* istanbul ignore next */
|
|
541
549
|
function(t, s) {
|
|
542
|
-
return new
|
|
543
|
-
}, e._Buffer_allocUnsafe =
|
|
550
|
+
return new u(t, s);
|
|
551
|
+
}, e._Buffer_allocUnsafe = u.allocUnsafe || /* istanbul ignore next */
|
|
544
552
|
function(t) {
|
|
545
|
-
return new
|
|
553
|
+
return new u(t);
|
|
546
554
|
};
|
|
547
555
|
};
|
|
548
556
|
}(minimal)), minimal;
|
|
@@ -573,8 +581,8 @@ Writer$1.alloc = function i(e) {
|
|
|
573
581
|
return new util$6.Array(e);
|
|
574
582
|
};
|
|
575
583
|
util$6.Array !== Array && (Writer$1.alloc = util$6.pool(Writer$1.alloc, util$6.Array.prototype.subarray));
|
|
576
|
-
Writer$1.prototype._push = function i(e, n,
|
|
577
|
-
return this.tail = this.tail.next = new Op(e, n,
|
|
584
|
+
Writer$1.prototype._push = function i(e, n, f) {
|
|
585
|
+
return this.tail = this.tail.next = new Op(e, n, f), this.len += n, this;
|
|
578
586
|
};
|
|
579
587
|
function writeByte(i, e, n) {
|
|
580
588
|
e[n] = i & 255;
|
|
@@ -638,19 +646,19 @@ Writer$1.prototype.float = function i(e) {
|
|
|
638
646
|
Writer$1.prototype.double = function i(e) {
|
|
639
647
|
return this._push(util$6.float.writeDoubleLE, 8, e);
|
|
640
648
|
};
|
|
641
|
-
var writeBytes = util$6.Array.prototype.set ? function i(e, n,
|
|
642
|
-
n.set(e,
|
|
643
|
-
} : function i(e, n,
|
|
644
|
-
for (var
|
|
645
|
-
n[
|
|
649
|
+
var writeBytes = util$6.Array.prototype.set ? function i(e, n, f) {
|
|
650
|
+
n.set(e, f);
|
|
651
|
+
} : function i(e, n, f) {
|
|
652
|
+
for (var u = 0; u < e.length; ++u)
|
|
653
|
+
n[f + u] = e[u];
|
|
646
654
|
};
|
|
647
655
|
Writer$1.prototype.bytes = function i(e) {
|
|
648
656
|
var n = e.length >>> 0;
|
|
649
657
|
if (!n)
|
|
650
658
|
return this._push(writeByte, 1, 0);
|
|
651
659
|
if (util$6.isString(e)) {
|
|
652
|
-
var
|
|
653
|
-
base64.decode(e,
|
|
660
|
+
var f = Writer$1.alloc(n = base64.length(e));
|
|
661
|
+
base64.decode(e, f, 0), e = f;
|
|
654
662
|
}
|
|
655
663
|
return this.uint32(n)._push(writeBytes, n, e);
|
|
656
664
|
};
|
|
@@ -665,12 +673,12 @@ Writer$1.prototype.reset = function i() {
|
|
|
665
673
|
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 Op(noop$1, 0, 0), this.len = 0), this;
|
|
666
674
|
};
|
|
667
675
|
Writer$1.prototype.ldelim = function i() {
|
|
668
|
-
var e = this.head, n = this.tail,
|
|
669
|
-
return this.reset().uint32(
|
|
676
|
+
var e = this.head, n = this.tail, f = this.len;
|
|
677
|
+
return this.reset().uint32(f), f && (this.tail.next = e.next, this.tail = n, this.len += f), this;
|
|
670
678
|
};
|
|
671
679
|
Writer$1.prototype.finish = function i() {
|
|
672
|
-
for (var e = this.head.next, n = this.constructor.alloc(this.len),
|
|
673
|
-
e.fn(e.val, n,
|
|
680
|
+
for (var e = this.head.next, n = this.constructor.alloc(this.len), f = 0; e; )
|
|
681
|
+
e.fn(e.val, n, f), f += e.len, e = e.next;
|
|
674
682
|
return n;
|
|
675
683
|
};
|
|
676
684
|
Writer$1._configure = function(i) {
|
|
@@ -683,13 +691,13 @@ function BufferWriter() {
|
|
|
683
691
|
Writer.call(this);
|
|
684
692
|
}
|
|
685
693
|
BufferWriter._configure = function() {
|
|
686
|
-
BufferWriter.alloc = util$5._Buffer_allocUnsafe, BufferWriter.writeBytesBuffer = util$5.Buffer && util$5.Buffer.prototype instanceof Uint8Array && util$5.Buffer.prototype.set.name === "set" ? function(e, n,
|
|
687
|
-
n.set(e,
|
|
688
|
-
} : function(e, n,
|
|
694
|
+
BufferWriter.alloc = util$5._Buffer_allocUnsafe, BufferWriter.writeBytesBuffer = util$5.Buffer && util$5.Buffer.prototype instanceof Uint8Array && util$5.Buffer.prototype.set.name === "set" ? function(e, n, f) {
|
|
695
|
+
n.set(e, f);
|
|
696
|
+
} : function(e, n, f) {
|
|
689
697
|
if (e.copy)
|
|
690
|
-
e.copy(n,
|
|
691
|
-
else for (var
|
|
692
|
-
n[
|
|
698
|
+
e.copy(n, f, 0, e.length);
|
|
699
|
+
else for (var u = 0; u < e.length; )
|
|
700
|
+
n[f++] = e[u++];
|
|
693
701
|
};
|
|
694
702
|
};
|
|
695
703
|
BufferWriter.prototype.bytes = function i(e) {
|
|
@@ -722,8 +730,8 @@ var create_array = typeof Uint8Array < "u" ? function i(e) {
|
|
|
722
730
|
throw Error("illegal buffer");
|
|
723
731
|
}, create = function i() {
|
|
724
732
|
return util$4.Buffer ? function(n) {
|
|
725
|
-
return (Reader$1.create = function(
|
|
726
|
-
return util$4.Buffer.isBuffer(
|
|
733
|
+
return (Reader$1.create = function(u) {
|
|
734
|
+
return util$4.Buffer.isBuffer(u) ? new BufferReader$1(u) : create_array(u);
|
|
727
735
|
})(n);
|
|
728
736
|
} : create_array;
|
|
729
737
|
};
|
|
@@ -811,16 +819,16 @@ Reader$1.prototype.double = function i() {
|
|
|
811
819
|
return this.pos += 8, e;
|
|
812
820
|
};
|
|
813
821
|
Reader$1.prototype.bytes = function i() {
|
|
814
|
-
var e = this.uint32(), n = this.pos,
|
|
815
|
-
if (
|
|
822
|
+
var e = this.uint32(), n = this.pos, f = this.pos + e;
|
|
823
|
+
if (f > this.len)
|
|
816
824
|
throw indexOutOfRange(this, e);
|
|
817
825
|
if (this.pos += e, Array.isArray(this.buf))
|
|
818
|
-
return this.buf.slice(n,
|
|
819
|
-
if (n ===
|
|
820
|
-
var
|
|
821
|
-
return
|
|
826
|
+
return this.buf.slice(n, f);
|
|
827
|
+
if (n === f) {
|
|
828
|
+
var u = util$4.Buffer;
|
|
829
|
+
return u ? u.alloc(0) : new this.buf.constructor(0);
|
|
822
830
|
}
|
|
823
|
-
return this._slice.call(this.buf, n,
|
|
831
|
+
return this._slice.call(this.buf, n, f);
|
|
824
832
|
};
|
|
825
833
|
Reader$1.prototype.string = function i() {
|
|
826
834
|
var e = this.bytes();
|
|
@@ -906,25 +914,25 @@ function Service(i, e, n) {
|
|
|
906
914
|
throw TypeError("rpcImpl must be a function");
|
|
907
915
|
util$2.EventEmitter.call(this), this.rpcImpl = i, this.requestDelimited = !!e, this.responseDelimited = !!n;
|
|
908
916
|
}
|
|
909
|
-
Service.prototype.rpcCall = function i(e, n,
|
|
910
|
-
if (!
|
|
917
|
+
Service.prototype.rpcCall = function i(e, n, f, u, a) {
|
|
918
|
+
if (!u)
|
|
911
919
|
throw TypeError("request must be specified");
|
|
912
920
|
var t = this;
|
|
913
|
-
if (!
|
|
914
|
-
return util$2.asPromise(i, t, e, n,
|
|
921
|
+
if (!a)
|
|
922
|
+
return util$2.asPromise(i, t, e, n, f, u);
|
|
915
923
|
if (!t.rpcImpl) {
|
|
916
924
|
setTimeout(function() {
|
|
917
|
-
|
|
925
|
+
a(Error("already ended"));
|
|
918
926
|
}, 0);
|
|
919
927
|
return;
|
|
920
928
|
}
|
|
921
929
|
try {
|
|
922
930
|
return t.rpcImpl(
|
|
923
931
|
e,
|
|
924
|
-
n[t.requestDelimited ? "encodeDelimited" : "encode"](
|
|
932
|
+
n[t.requestDelimited ? "encodeDelimited" : "encode"](u).finish(),
|
|
925
933
|
function(o, r) {
|
|
926
934
|
if (o)
|
|
927
|
-
return t.emit("error", o, e),
|
|
935
|
+
return t.emit("error", o, e), a(o);
|
|
928
936
|
if (r === null) {
|
|
929
937
|
t.end(
|
|
930
938
|
/* endedByRPC */
|
|
@@ -932,18 +940,18 @@ Service.prototype.rpcCall = function i(e, n, a, f, u) {
|
|
|
932
940
|
);
|
|
933
941
|
return;
|
|
934
942
|
}
|
|
935
|
-
if (!(r instanceof
|
|
943
|
+
if (!(r instanceof f))
|
|
936
944
|
try {
|
|
937
|
-
r =
|
|
945
|
+
r = f[t.responseDelimited ? "decodeDelimited" : "decode"](r);
|
|
938
946
|
} catch (l) {
|
|
939
|
-
return t.emit("error", l, e),
|
|
947
|
+
return t.emit("error", l, e), a(l);
|
|
940
948
|
}
|
|
941
|
-
return t.emit("data", r, e),
|
|
949
|
+
return t.emit("data", r, e), a(null, r);
|
|
942
950
|
}
|
|
943
951
|
);
|
|
944
952
|
} catch (s) {
|
|
945
953
|
t.emit("error", s, e), setTimeout(function() {
|
|
946
|
-
|
|
954
|
+
a(s);
|
|
947
955
|
}, 0);
|
|
948
956
|
return;
|
|
949
957
|
}
|
|
@@ -968,20 +976,20 @@ var util$1 = { exports: {} }, codegen_1 = codegen;
|
|
|
968
976
|
function codegen(i, e) {
|
|
969
977
|
typeof i == "string" && (e = i, i = void 0);
|
|
970
978
|
var n = [];
|
|
971
|
-
function a
|
|
972
|
-
if (typeof
|
|
973
|
-
var t =
|
|
974
|
-
if (codegen.verbose && console.log("codegen: " + t), t = "return " + t,
|
|
975
|
-
for (var s = Object.keys(
|
|
976
|
-
o[l] = s[l], r[l] =
|
|
979
|
+
function f(a) {
|
|
980
|
+
if (typeof a != "string") {
|
|
981
|
+
var t = u();
|
|
982
|
+
if (codegen.verbose && console.log("codegen: " + t), t = "return " + t, a) {
|
|
983
|
+
for (var s = Object.keys(a), o = new Array(s.length + 1), r = new Array(s.length), l = 0; l < s.length; )
|
|
984
|
+
o[l] = s[l], r[l] = a[s[l++]];
|
|
977
985
|
return o[l] = t, Function.apply(null, o).apply(null, r);
|
|
978
986
|
}
|
|
979
987
|
return Function(t)();
|
|
980
988
|
}
|
|
981
|
-
for (var d = new Array(arguments.length - 1),
|
|
982
|
-
d[
|
|
983
|
-
if (
|
|
984
|
-
var _ = d[
|
|
989
|
+
for (var d = new Array(arguments.length - 1), h = 0; h < d.length; )
|
|
990
|
+
d[h] = arguments[++h];
|
|
991
|
+
if (h = 0, a = a.replace(/%([%dfijs])/g, function(p, m) {
|
|
992
|
+
var _ = d[h++];
|
|
985
993
|
switch (m) {
|
|
986
994
|
case "d":
|
|
987
995
|
case "f":
|
|
@@ -994,43 +1002,43 @@ function codegen(i, e) {
|
|
|
994
1002
|
return String(_);
|
|
995
1003
|
}
|
|
996
1004
|
return "%";
|
|
997
|
-
}),
|
|
1005
|
+
}), h !== d.length)
|
|
998
1006
|
throw Error("parameter count mismatch");
|
|
999
|
-
return n.push(
|
|
1007
|
+
return n.push(a), f;
|
|
1000
1008
|
}
|
|
1001
|
-
function
|
|
1002
|
-
return "function " + (
|
|
1009
|
+
function u(a) {
|
|
1010
|
+
return "function " + (a || e || "") + "(" + (i && i.join(",") || "") + `){
|
|
1003
1011
|
` + n.join(`
|
|
1004
1012
|
`) + `
|
|
1005
1013
|
}`;
|
|
1006
1014
|
}
|
|
1007
|
-
return
|
|
1015
|
+
return f.toString = u, f;
|
|
1008
1016
|
}
|
|
1009
1017
|
codegen.verbose = !1;
|
|
1010
1018
|
var fetch_1 = fetch, asPromise = aspromise, inquire = inquire_1, fs = inquire("fs");
|
|
1011
1019
|
function fetch(i, e, n) {
|
|
1012
|
-
return typeof e == "function" ? (n = e, e = {}) : e || (e = {}), n ? !e.xhr && fs && fs.readFile ? fs.readFile(i, function(
|
|
1013
|
-
return
|
|
1020
|
+
return typeof e == "function" ? (n = e, e = {}) : e || (e = {}), n ? !e.xhr && fs && fs.readFile ? fs.readFile(i, function(u, a) {
|
|
1021
|
+
return u && typeof XMLHttpRequest < "u" ? fetch.xhr(i, e, n) : u ? n(u) : n(null, e.binary ? a : a.toString("utf8"));
|
|
1014
1022
|
}) : fetch.xhr(i, e, n) : asPromise(fetch, this, i, e);
|
|
1015
1023
|
}
|
|
1016
|
-
fetch.xhr = function i(e, n,
|
|
1017
|
-
var
|
|
1018
|
-
|
|
1019
|
-
if (
|
|
1020
|
-
if (
|
|
1021
|
-
return
|
|
1024
|
+
fetch.xhr = function i(e, n, f) {
|
|
1025
|
+
var u = new XMLHttpRequest();
|
|
1026
|
+
u.onreadystatechange = function() {
|
|
1027
|
+
if (u.readyState === 4) {
|
|
1028
|
+
if (u.status !== 0 && u.status !== 200)
|
|
1029
|
+
return f(Error("status " + u.status));
|
|
1022
1030
|
if (n.binary) {
|
|
1023
|
-
var t =
|
|
1031
|
+
var t = u.response;
|
|
1024
1032
|
if (!t) {
|
|
1025
1033
|
t = [];
|
|
1026
|
-
for (var s = 0; s <
|
|
1027
|
-
t.push(
|
|
1034
|
+
for (var s = 0; s < u.responseText.length; ++s)
|
|
1035
|
+
t.push(u.responseText.charCodeAt(s) & 255);
|
|
1028
1036
|
}
|
|
1029
|
-
return
|
|
1037
|
+
return f(null, typeof Uint8Array < "u" ? new Uint8Array(t) : t);
|
|
1030
1038
|
}
|
|
1031
|
-
return
|
|
1039
|
+
return f(null, u.responseText);
|
|
1032
1040
|
}
|
|
1033
|
-
}, n.binary && ("overrideMimeType" in
|
|
1041
|
+
}, n.binary && ("overrideMimeType" in u && u.overrideMimeType("text/plain; charset=x-user-defined"), u.responseType = "arraybuffer"), u.open("GET", e), u.send();
|
|
1034
1042
|
};
|
|
1035
1043
|
var path = {};
|
|
1036
1044
|
(function(i) {
|
|
@@ -1040,32 +1048,32 @@ var path = {};
|
|
|
1040
1048
|
* @param {string} path Path to test
|
|
1041
1049
|
* @returns {boolean} `true` if path is absolute
|
|
1042
1050
|
*/
|
|
1043
|
-
e.isAbsolute = function(
|
|
1044
|
-
return /^(?:\/|\w+:)/.test(
|
|
1051
|
+
e.isAbsolute = function(a) {
|
|
1052
|
+
return /^(?:\/|\w+:)/.test(a);
|
|
1045
1053
|
}
|
|
1046
|
-
),
|
|
1054
|
+
), f = (
|
|
1047
1055
|
/**
|
|
1048
1056
|
* Normalizes the specified path.
|
|
1049
1057
|
* @param {string} path Path to normalize
|
|
1050
1058
|
* @returns {string} Normalized path
|
|
1051
1059
|
*/
|
|
1052
|
-
e.normalize = function(
|
|
1053
|
-
|
|
1054
|
-
var t =
|
|
1060
|
+
e.normalize = function(a) {
|
|
1061
|
+
a = a.replace(/\\/g, "/").replace(/\/{2,}/g, "/");
|
|
1062
|
+
var t = a.split("/"), s = n(a), o = "";
|
|
1055
1063
|
s && (o = t.shift() + "/");
|
|
1056
1064
|
for (var r = 0; r < t.length; )
|
|
1057
1065
|
t[r] === ".." ? r > 0 && t[r - 1] !== ".." ? t.splice(--r, 2) : s ? t.splice(r, 1) : ++r : t[r] === "." ? t.splice(r, 1) : ++r;
|
|
1058
1066
|
return o + t.join("/");
|
|
1059
1067
|
}
|
|
1060
1068
|
);
|
|
1061
|
-
e.resolve = function(
|
|
1062
|
-
return s || (t =
|
|
1069
|
+
e.resolve = function(a, t, s) {
|
|
1070
|
+
return s || (t = f(t)), n(t) ? t : (s || (a = f(a)), (a = a.replace(/(?:\/|^)[^/]+$/, "")).length ? f(a + "/" + t) : t);
|
|
1063
1071
|
};
|
|
1064
1072
|
})(path);
|
|
1065
1073
|
var types = {}, hasRequiredTypes;
|
|
1066
1074
|
function requireTypes() {
|
|
1067
1075
|
return hasRequiredTypes || (hasRequiredTypes = 1, function(i) {
|
|
1068
|
-
var e = i, n = requireUtil(),
|
|
1076
|
+
var e = i, n = requireUtil(), f = [
|
|
1069
1077
|
"double",
|
|
1070
1078
|
// 0
|
|
1071
1079
|
"float",
|
|
@@ -1097,12 +1105,12 @@ function requireTypes() {
|
|
|
1097
1105
|
"bytes"
|
|
1098
1106
|
// 14
|
|
1099
1107
|
];
|
|
1100
|
-
function
|
|
1108
|
+
function u(a, t) {
|
|
1101
1109
|
var s = 0, o = {};
|
|
1102
|
-
for (t |= 0; s <
|
|
1110
|
+
for (t |= 0; s < a.length; ) o[f[s + t]] = a[s++];
|
|
1103
1111
|
return o;
|
|
1104
1112
|
}
|
|
1105
|
-
e.basic =
|
|
1113
|
+
e.basic = u([
|
|
1106
1114
|
/* double */
|
|
1107
1115
|
1,
|
|
1108
1116
|
/* float */
|
|
@@ -1133,7 +1141,7 @@ function requireTypes() {
|
|
|
1133
1141
|
2,
|
|
1134
1142
|
/* bytes */
|
|
1135
1143
|
2
|
|
1136
|
-
]), e.defaults =
|
|
1144
|
+
]), e.defaults = u([
|
|
1137
1145
|
/* double */
|
|
1138
1146
|
0,
|
|
1139
1147
|
/* float */
|
|
@@ -1166,7 +1174,7 @@ function requireTypes() {
|
|
|
1166
1174
|
n.emptyArray,
|
|
1167
1175
|
/* message */
|
|
1168
1176
|
null
|
|
1169
|
-
]), e.long =
|
|
1177
|
+
]), e.long = u([
|
|
1170
1178
|
/* int64 */
|
|
1171
1179
|
0,
|
|
1172
1180
|
/* uint64 */
|
|
@@ -1177,7 +1185,7 @@ function requireTypes() {
|
|
|
1177
1185
|
1,
|
|
1178
1186
|
/* sfixed64 */
|
|
1179
1187
|
1
|
|
1180
|
-
], 7), e.mapKey =
|
|
1188
|
+
], 7), e.mapKey = u([
|
|
1181
1189
|
/* int32 */
|
|
1182
1190
|
0,
|
|
1183
1191
|
/* uint32 */
|
|
@@ -1202,7 +1210,7 @@ function requireTypes() {
|
|
|
1202
1210
|
0,
|
|
1203
1211
|
/* string */
|
|
1204
1212
|
2
|
|
1205
|
-
], 2), e.packed =
|
|
1213
|
+
], 2), e.packed = u([
|
|
1206
1214
|
/* double */
|
|
1207
1215
|
1,
|
|
1208
1216
|
/* float */
|
|
@@ -1238,23 +1246,23 @@ function requireField() {
|
|
|
1238
1246
|
hasRequiredField = 1, field = t;
|
|
1239
1247
|
var i = requireObject();
|
|
1240
1248
|
((t.prototype = Object.create(i.prototype)).constructor = t).className = "Field";
|
|
1241
|
-
var e = require_enum(), n = requireTypes(),
|
|
1249
|
+
var e = require_enum(), n = requireTypes(), f = requireUtil(), u, a = /^required|optional|repeated$/;
|
|
1242
1250
|
t.fromJSON = function(o, r) {
|
|
1243
1251
|
return new t(o, r.id, r.type, r.rule, r.extend, r.options, r.comment);
|
|
1244
1252
|
};
|
|
1245
|
-
function t(s, o, r, l, d,
|
|
1246
|
-
if (
|
|
1253
|
+
function t(s, o, r, l, d, h, c) {
|
|
1254
|
+
if (f.isObject(l) ? (c = d, h = l, l = d = void 0) : f.isObject(d) && (c = h, h = d, d = void 0), i.call(this, s, h), !f.isInteger(o) || o < 0)
|
|
1247
1255
|
throw TypeError("id must be a non-negative integer");
|
|
1248
|
-
if (!
|
|
1256
|
+
if (!f.isString(r))
|
|
1249
1257
|
throw TypeError("type must be a string");
|
|
1250
|
-
if (l !== void 0 && !
|
|
1258
|
+
if (l !== void 0 && !a.test(l = l.toString().toLowerCase()))
|
|
1251
1259
|
throw TypeError("rule must be a string rule");
|
|
1252
|
-
if (d !== void 0 && !
|
|
1260
|
+
if (d !== void 0 && !f.isString(d))
|
|
1253
1261
|
throw TypeError("extend must be a string");
|
|
1254
|
-
l === "proto3_optional" && (l = "optional"), this.rule = l && l !== "optional" ? l : void 0, this.type = r, this.id = o, this.extend = d || void 0, this.required = l === "required", this.optional = !this.required, this.repeated = l === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long =
|
|
1262
|
+
l === "proto3_optional" && (l = "optional"), this.rule = l && l !== "optional" ? l : void 0, this.type = r, this.id = o, this.extend = d || void 0, this.required = l === "required", this.optional = !this.required, this.repeated = l === "repeated", this.map = !1, this.message = null, this.partOf = null, this.typeDefault = null, this.defaultValue = null, this.long = f.Long ? n.long[r] !== void 0 : (
|
|
1255
1263
|
/* istanbul ignore next */
|
|
1256
1264
|
!1
|
|
1257
|
-
), this.bytes = r === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment =
|
|
1265
|
+
), this.bytes = r === "bytes", this.resolvedType = null, this.extensionField = null, this.declaringField = null, this._packed = null, this.comment = c;
|
|
1258
1266
|
}
|
|
1259
1267
|
return Object.defineProperty(t.prototype, "packed", {
|
|
1260
1268
|
get: function() {
|
|
@@ -1264,7 +1272,7 @@ function requireField() {
|
|
|
1264
1272
|
return o === "packed" && (this._packed = null), i.prototype.setOption.call(this, o, r, l);
|
|
1265
1273
|
}, t.prototype.toJSON = function(o) {
|
|
1266
1274
|
var r = o ? !!o.keepComments : !1;
|
|
1267
|
-
return
|
|
1275
|
+
return f.toObject([
|
|
1268
1276
|
"rule",
|
|
1269
1277
|
this.rule !== "optional" && this.rule || void 0,
|
|
1270
1278
|
"type",
|
|
@@ -1281,36 +1289,36 @@ function requireField() {
|
|
|
1281
1289
|
}, t.prototype.resolve = function() {
|
|
1282
1290
|
if (this.resolved)
|
|
1283
1291
|
return this;
|
|
1284
|
-
if ((this.typeDefault = n.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof
|
|
1285
|
-
this.typeDefault =
|
|
1292
|
+
if ((this.typeDefault = n.defaults[this.type]) === void 0 ? (this.resolvedType = (this.declaringField ? this.declaringField.parent : this.parent).lookupTypeOrEnum(this.type), this.resolvedType instanceof u ? 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 e && typeof this.typeDefault == "string" && (this.typeDefault = this.resolvedType.values[this.typeDefault])), this.options && ((this.options.packed === !0 || this.options.packed !== void 0 && this.resolvedType && !(this.resolvedType instanceof e)) && delete this.options.packed, Object.keys(this.options).length || (this.options = void 0)), this.long)
|
|
1293
|
+
this.typeDefault = f.Long.fromNumber(this.typeDefault, this.type.charAt(0) === "u"), Object.freeze && Object.freeze(this.typeDefault);
|
|
1286
1294
|
else if (this.bytes && typeof this.typeDefault == "string") {
|
|
1287
1295
|
var o;
|
|
1288
|
-
|
|
1296
|
+
f.base64.test(this.typeDefault) ? f.base64.decode(this.typeDefault, o = f.newBuffer(f.base64.length(this.typeDefault)), 0) : f.utf8.write(this.typeDefault, o = f.newBuffer(f.utf8.length(this.typeDefault)), 0), this.typeDefault = o;
|
|
1289
1297
|
}
|
|
1290
|
-
return this.map ? this.defaultValue =
|
|
1298
|
+
return this.map ? this.defaultValue = f.emptyObject : this.repeated ? this.defaultValue = f.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof u && (this.parent.ctor.prototype[this.name] = this.defaultValue), i.prototype.resolve.call(this);
|
|
1291
1299
|
}, t.d = function(o, r, l, d) {
|
|
1292
|
-
return typeof r == "function" ? r =
|
|
1293
|
-
|
|
1300
|
+
return typeof r == "function" ? r = f.decorateType(r).name : r && typeof r == "object" && (r = f.decorateEnum(r).name), function(c, p) {
|
|
1301
|
+
f.decorateType(c.constructor).add(new t(p, o, r, l, { default: d }));
|
|
1294
1302
|
};
|
|
1295
1303
|
}, t._configure = function(o) {
|
|
1296
|
-
|
|
1304
|
+
u = o;
|
|
1297
1305
|
}, field;
|
|
1298
1306
|
}
|
|
1299
1307
|
var oneof, hasRequiredOneof;
|
|
1300
1308
|
function requireOneof() {
|
|
1301
1309
|
if (hasRequiredOneof) return oneof;
|
|
1302
|
-
hasRequiredOneof = 1, oneof =
|
|
1310
|
+
hasRequiredOneof = 1, oneof = f;
|
|
1303
1311
|
var i = requireObject();
|
|
1304
|
-
((
|
|
1312
|
+
((f.prototype = Object.create(i.prototype)).constructor = f).className = "OneOf";
|
|
1305
1313
|
var e = requireField(), n = requireUtil();
|
|
1306
|
-
function a
|
|
1307
|
-
if (Array.isArray(t) || (s = t, t = void 0), i.call(this,
|
|
1314
|
+
function f(a, t, s, o) {
|
|
1315
|
+
if (Array.isArray(t) || (s = t, t = void 0), i.call(this, a, s), !(t === void 0 || Array.isArray(t)))
|
|
1308
1316
|
throw TypeError("fieldNames must be an Array");
|
|
1309
1317
|
this.oneof = t || [], this.fieldsArray = [], this.comment = o;
|
|
1310
1318
|
}
|
|
1311
|
-
|
|
1312
|
-
return new
|
|
1313
|
-
},
|
|
1319
|
+
f.fromJSON = function(t, s) {
|
|
1320
|
+
return new f(t, s.oneof, s.options, s.comment);
|
|
1321
|
+
}, f.prototype.toJSON = function(t) {
|
|
1314
1322
|
var s = t ? !!t.keepComments : !1;
|
|
1315
1323
|
return n.toObject([
|
|
1316
1324
|
"options",
|
|
@@ -1321,38 +1329,38 @@ function requireOneof() {
|
|
|
1321
1329
|
s ? this.comment : void 0
|
|
1322
1330
|
]);
|
|
1323
1331
|
};
|
|
1324
|
-
function
|
|
1325
|
-
if (
|
|
1326
|
-
for (var t = 0; t <
|
|
1327
|
-
|
|
1332
|
+
function u(a) {
|
|
1333
|
+
if (a.parent)
|
|
1334
|
+
for (var t = 0; t < a.fieldsArray.length; ++t)
|
|
1335
|
+
a.fieldsArray[t].parent || a.parent.add(a.fieldsArray[t]);
|
|
1328
1336
|
}
|
|
1329
|
-
return
|
|
1337
|
+
return f.prototype.add = function(t) {
|
|
1330
1338
|
if (!(t instanceof e))
|
|
1331
1339
|
throw TypeError("field must be a Field");
|
|
1332
|
-
return t.parent && t.parent !== this.parent && t.parent.remove(t), this.oneof.push(t.name), this.fieldsArray.push(t), t.partOf = this,
|
|
1333
|
-
},
|
|
1340
|
+
return t.parent && t.parent !== this.parent && t.parent.remove(t), this.oneof.push(t.name), this.fieldsArray.push(t), t.partOf = this, u(this), this;
|
|
1341
|
+
}, f.prototype.remove = function(t) {
|
|
1334
1342
|
if (!(t instanceof e))
|
|
1335
1343
|
throw TypeError("field must be a Field");
|
|
1336
1344
|
var s = this.fieldsArray.indexOf(t);
|
|
1337
1345
|
if (s < 0)
|
|
1338
1346
|
throw Error(t + " is not a member of " + this);
|
|
1339
1347
|
return this.fieldsArray.splice(s, 1), s = this.oneof.indexOf(t.name), s > -1 && this.oneof.splice(s, 1), t.partOf = null, this;
|
|
1340
|
-
},
|
|
1348
|
+
}, f.prototype.onAdd = function(t) {
|
|
1341
1349
|
i.prototype.onAdd.call(this, t);
|
|
1342
1350
|
for (var s = this, o = 0; o < this.oneof.length; ++o) {
|
|
1343
1351
|
var r = t.get(this.oneof[o]);
|
|
1344
1352
|
r && !r.partOf && (r.partOf = s, s.fieldsArray.push(r));
|
|
1345
1353
|
}
|
|
1346
|
-
|
|
1347
|
-
},
|
|
1354
|
+
u(this);
|
|
1355
|
+
}, f.prototype.onRemove = function(t) {
|
|
1348
1356
|
for (var s = 0, o; s < this.fieldsArray.length; ++s)
|
|
1349
1357
|
(o = this.fieldsArray[s]).parent && o.parent.remove(o);
|
|
1350
1358
|
i.prototype.onRemove.call(this, t);
|
|
1351
|
-
},
|
|
1359
|
+
}, f.d = function() {
|
|
1352
1360
|
for (var t = new Array(arguments.length), s = 0; s < arguments.length; )
|
|
1353
1361
|
t[s] = arguments[s++];
|
|
1354
1362
|
return function(r, l) {
|
|
1355
|
-
n.decorateType(r.constructor).add(new
|
|
1363
|
+
n.decorateType(r.constructor).add(new f(l, t)), Object.defineProperty(r, l, {
|
|
1356
1364
|
get: n.oneOfGetter(t),
|
|
1357
1365
|
set: n.oneOfSetter(t)
|
|
1358
1366
|
});
|
|
@@ -1365,28 +1373,28 @@ function requireNamespace() {
|
|
|
1365
1373
|
hasRequiredNamespace = 1, namespace = o;
|
|
1366
1374
|
var i = requireObject();
|
|
1367
1375
|
((o.prototype = Object.create(i.prototype)).constructor = o).className = "Namespace";
|
|
1368
|
-
var e = requireField(), n = requireUtil(),
|
|
1369
|
-
o.fromJSON = function(d,
|
|
1370
|
-
return new o(d,
|
|
1376
|
+
var e = requireField(), n = requireUtil(), f = requireOneof(), u, a, t;
|
|
1377
|
+
o.fromJSON = function(d, h) {
|
|
1378
|
+
return new o(d, h.options).addJSON(h.nested);
|
|
1371
1379
|
};
|
|
1372
1380
|
function s(l, d) {
|
|
1373
1381
|
if (l && l.length) {
|
|
1374
|
-
for (var
|
|
1375
|
-
|
|
1376
|
-
return
|
|
1382
|
+
for (var h = {}, c = 0; c < l.length; ++c)
|
|
1383
|
+
h[l[c].name] = l[c].toJSON(d);
|
|
1384
|
+
return h;
|
|
1377
1385
|
}
|
|
1378
1386
|
}
|
|
1379
|
-
o.arrayToJSON = s, o.isReservedId = function(d,
|
|
1387
|
+
o.arrayToJSON = s, o.isReservedId = function(d, h) {
|
|
1380
1388
|
if (d) {
|
|
1381
|
-
for (var
|
|
1382
|
-
if (typeof d[
|
|
1389
|
+
for (var c = 0; c < d.length; ++c)
|
|
1390
|
+
if (typeof d[c] != "string" && d[c][0] <= h && d[c][1] > h)
|
|
1383
1391
|
return !0;
|
|
1384
1392
|
}
|
|
1385
1393
|
return !1;
|
|
1386
|
-
}, o.isReservedName = function(d,
|
|
1394
|
+
}, o.isReservedName = function(d, h) {
|
|
1387
1395
|
if (d) {
|
|
1388
|
-
for (var
|
|
1389
|
-
if (d[
|
|
1396
|
+
for (var c = 0; c < d.length; ++c)
|
|
1397
|
+
if (d[c] === h)
|
|
1390
1398
|
return !0;
|
|
1391
1399
|
}
|
|
1392
1400
|
return !1;
|
|
@@ -1409,12 +1417,12 @@ function requireNamespace() {
|
|
|
1409
1417
|
s(this.nestedArray, d)
|
|
1410
1418
|
]);
|
|
1411
1419
|
}, o.prototype.addJSON = function(d) {
|
|
1412
|
-
var
|
|
1420
|
+
var h = this;
|
|
1413
1421
|
if (d)
|
|
1414
|
-
for (var
|
|
1415
|
-
m = d[
|
|
1422
|
+
for (var c = Object.keys(d), p = 0, m; p < c.length; ++p)
|
|
1423
|
+
m = d[c[p]], h.add(
|
|
1416
1424
|
// most to least likely
|
|
1417
|
-
(m.fields !== void 0 ?
|
|
1425
|
+
(m.fields !== void 0 ? u.fromJSON : m.values !== void 0 ? t.fromJSON : m.methods !== void 0 ? a.fromJSON : m.id !== void 0 ? e.fromJSON : o.fromJSON)(c[p], m)
|
|
1418
1426
|
);
|
|
1419
1427
|
return this;
|
|
1420
1428
|
}, o.prototype.get = function(d) {
|
|
@@ -1424,17 +1432,17 @@ function requireNamespace() {
|
|
|
1424
1432
|
return this.nested[d].values;
|
|
1425
1433
|
throw Error("no such enum: " + d);
|
|
1426
1434
|
}, o.prototype.add = function(d) {
|
|
1427
|
-
if (!(d instanceof e && d.extend !== void 0 || d instanceof
|
|
1435
|
+
if (!(d instanceof e && d.extend !== void 0 || d instanceof u || d instanceof f || d instanceof t || d instanceof a || d instanceof o))
|
|
1428
1436
|
throw TypeError("object must be a valid nested object");
|
|
1429
1437
|
if (!this.nested)
|
|
1430
1438
|
this.nested = {};
|
|
1431
1439
|
else {
|
|
1432
|
-
var
|
|
1433
|
-
if (
|
|
1434
|
-
if (
|
|
1435
|
-
for (var
|
|
1436
|
-
d.add(
|
|
1437
|
-
this.remove(
|
|
1440
|
+
var h = this.get(d.name);
|
|
1441
|
+
if (h)
|
|
1442
|
+
if (h instanceof o && d instanceof o && !(h instanceof u || h instanceof a)) {
|
|
1443
|
+
for (var c = h.nestedArray, p = 0; p < c.length; ++p)
|
|
1444
|
+
d.add(c[p]);
|
|
1445
|
+
this.remove(h), this.nested || (this.nested = {}), d.setOptions(h.options, !0);
|
|
1438
1446
|
} else
|
|
1439
1447
|
throw Error("duplicate name '" + d.name + "' in " + this);
|
|
1440
1448
|
}
|
|
@@ -1445,87 +1453,87 @@ function requireNamespace() {
|
|
|
1445
1453
|
if (d.parent !== this)
|
|
1446
1454
|
throw Error(d + " is not a member of " + this);
|
|
1447
1455
|
return delete this.nested[d.name], Object.keys(this.nested).length || (this.nested = void 0), d.onRemove(this), r(this);
|
|
1448
|
-
}, o.prototype.define = function(d,
|
|
1456
|
+
}, o.prototype.define = function(d, h) {
|
|
1449
1457
|
if (n.isString(d))
|
|
1450
1458
|
d = d.split(".");
|
|
1451
1459
|
else if (!Array.isArray(d))
|
|
1452
1460
|
throw TypeError("illegal path");
|
|
1453
1461
|
if (d && d.length && d[0] === "")
|
|
1454
1462
|
throw Error("path must be relative");
|
|
1455
|
-
for (var
|
|
1463
|
+
for (var c = this; d.length > 0; ) {
|
|
1456
1464
|
var p = d.shift();
|
|
1457
|
-
if (
|
|
1458
|
-
if (
|
|
1465
|
+
if (c.nested && c.nested[p]) {
|
|
1466
|
+
if (c = c.nested[p], !(c instanceof o))
|
|
1459
1467
|
throw Error("path conflicts with non-namespace objects");
|
|
1460
1468
|
} else
|
|
1461
|
-
|
|
1469
|
+
c.add(c = new o(p));
|
|
1462
1470
|
}
|
|
1463
|
-
return
|
|
1471
|
+
return h && c.addJSON(h), c;
|
|
1464
1472
|
}, o.prototype.resolveAll = function() {
|
|
1465
|
-
for (var d = this.nestedArray,
|
|
1466
|
-
d[
|
|
1473
|
+
for (var d = this.nestedArray, h = 0; h < d.length; )
|
|
1474
|
+
d[h] instanceof o ? d[h++].resolveAll() : d[h++].resolve();
|
|
1467
1475
|
return this.resolve();
|
|
1468
|
-
}, o.prototype.lookup = function(d,
|
|
1469
|
-
if (typeof
|
|
1476
|
+
}, o.prototype.lookup = function(d, h, c) {
|
|
1477
|
+
if (typeof h == "boolean" ? (c = h, h = void 0) : h && !Array.isArray(h) && (h = [h]), n.isString(d) && d.length) {
|
|
1470
1478
|
if (d === ".")
|
|
1471
1479
|
return this.root;
|
|
1472
1480
|
d = d.split(".");
|
|
1473
1481
|
} else if (!d.length)
|
|
1474
1482
|
return this;
|
|
1475
1483
|
if (d[0] === "")
|
|
1476
|
-
return this.root.lookup(d.slice(1),
|
|
1484
|
+
return this.root.lookup(d.slice(1), h);
|
|
1477
1485
|
var p = this.get(d[0]);
|
|
1478
1486
|
if (p) {
|
|
1479
1487
|
if (d.length === 1) {
|
|
1480
|
-
if (!
|
|
1488
|
+
if (!h || h.indexOf(p.constructor) > -1)
|
|
1481
1489
|
return p;
|
|
1482
|
-
} else if (p instanceof o && (p = p.lookup(d.slice(1),
|
|
1490
|
+
} else if (p instanceof o && (p = p.lookup(d.slice(1), h, !0)))
|
|
1483
1491
|
return p;
|
|
1484
1492
|
} else
|
|
1485
1493
|
for (var m = 0; m < this.nestedArray.length; ++m)
|
|
1486
|
-
if (this._nestedArray[m] instanceof o && (p = this._nestedArray[m].lookup(d,
|
|
1494
|
+
if (this._nestedArray[m] instanceof o && (p = this._nestedArray[m].lookup(d, h, !0)))
|
|
1487
1495
|
return p;
|
|
1488
|
-
return this.parent === null ||
|
|
1496
|
+
return this.parent === null || c ? null : this.parent.lookup(d, h);
|
|
1489
1497
|
}, o.prototype.lookupType = function(d) {
|
|
1490
|
-
var
|
|
1491
|
-
if (!
|
|
1498
|
+
var h = this.lookup(d, [u]);
|
|
1499
|
+
if (!h)
|
|
1492
1500
|
throw Error("no such type: " + d);
|
|
1493
|
-
return
|
|
1501
|
+
return h;
|
|
1494
1502
|
}, o.prototype.lookupEnum = function(d) {
|
|
1495
|
-
var
|
|
1496
|
-
if (!
|
|
1503
|
+
var h = this.lookup(d, [t]);
|
|
1504
|
+
if (!h)
|
|
1497
1505
|
throw Error("no such Enum '" + d + "' in " + this);
|
|
1498
|
-
return
|
|
1506
|
+
return h;
|
|
1499
1507
|
}, o.prototype.lookupTypeOrEnum = function(d) {
|
|
1500
|
-
var
|
|
1501
|
-
if (!
|
|
1508
|
+
var h = this.lookup(d, [u, t]);
|
|
1509
|
+
if (!h)
|
|
1502
1510
|
throw Error("no such Type or Enum '" + d + "' in " + this);
|
|
1503
|
-
return
|
|
1511
|
+
return h;
|
|
1504
1512
|
}, o.prototype.lookupService = function(d) {
|
|
1505
|
-
var
|
|
1506
|
-
if (!
|
|
1513
|
+
var h = this.lookup(d, [a]);
|
|
1514
|
+
if (!h)
|
|
1507
1515
|
throw Error("no such Service '" + d + "' in " + this);
|
|
1508
|
-
return
|
|
1509
|
-
}, o._configure = function(l, d,
|
|
1510
|
-
|
|
1516
|
+
return h;
|
|
1517
|
+
}, o._configure = function(l, d, h) {
|
|
1518
|
+
u = l, a = d, t = h;
|
|
1511
1519
|
}, namespace;
|
|
1512
1520
|
}
|
|
1513
1521
|
var mapfield, hasRequiredMapfield;
|
|
1514
1522
|
function requireMapfield() {
|
|
1515
1523
|
if (hasRequiredMapfield) return mapfield;
|
|
1516
|
-
hasRequiredMapfield = 1, mapfield =
|
|
1524
|
+
hasRequiredMapfield = 1, mapfield = f;
|
|
1517
1525
|
var i = requireField();
|
|
1518
|
-
((
|
|
1526
|
+
((f.prototype = Object.create(i.prototype)).constructor = f).className = "MapField";
|
|
1519
1527
|
var e = requireTypes(), n = requireUtil();
|
|
1520
|
-
function
|
|
1521
|
-
if (i.call(this,
|
|
1528
|
+
function f(u, a, t, s, o, r) {
|
|
1529
|
+
if (i.call(this, u, a, s, void 0, void 0, o, r), !n.isString(t))
|
|
1522
1530
|
throw TypeError("keyType must be a string");
|
|
1523
1531
|
this.keyType = t, this.resolvedKeyType = null, this.map = !0;
|
|
1524
1532
|
}
|
|
1525
|
-
return
|
|
1526
|
-
return new a
|
|
1527
|
-
},
|
|
1528
|
-
var t =
|
|
1533
|
+
return f.fromJSON = function(a, t) {
|
|
1534
|
+
return new f(a, t.id, t.keyType, t.type, t.options, t.comment);
|
|
1535
|
+
}, f.prototype.toJSON = function(a) {
|
|
1536
|
+
var t = a ? !!a.keepComments : !1;
|
|
1529
1537
|
return n.toObject([
|
|
1530
1538
|
"keyType",
|
|
1531
1539
|
this.keyType,
|
|
@@ -1540,15 +1548,15 @@ function requireMapfield() {
|
|
|
1540
1548
|
"comment",
|
|
1541
1549
|
t ? this.comment : void 0
|
|
1542
1550
|
]);
|
|
1543
|
-
},
|
|
1551
|
+
}, f.prototype.resolve = function() {
|
|
1544
1552
|
if (this.resolved)
|
|
1545
1553
|
return this;
|
|
1546
1554
|
if (e.mapKey[this.keyType] === void 0)
|
|
1547
1555
|
throw Error("invalid key type: " + this.keyType);
|
|
1548
1556
|
return i.prototype.resolve.call(this);
|
|
1549
|
-
},
|
|
1557
|
+
}, f.d = function(a, t, s) {
|
|
1550
1558
|
return typeof s == "function" ? s = n.decorateType(s).name : s && typeof s == "object" && (s = n.decorateEnum(s).name), function(r, l) {
|
|
1551
|
-
n.decorateType(r.constructor).add(new
|
|
1559
|
+
n.decorateType(r.constructor).add(new f(l, a, t, s));
|
|
1552
1560
|
};
|
|
1553
1561
|
}, mapfield;
|
|
1554
1562
|
}
|
|
@@ -1559,19 +1567,19 @@ function requireMethod() {
|
|
|
1559
1567
|
var i = requireObject();
|
|
1560
1568
|
((n.prototype = Object.create(i.prototype)).constructor = n).className = "Method";
|
|
1561
1569
|
var e = requireUtil();
|
|
1562
|
-
function n(
|
|
1563
|
-
if (e.isObject(s) ? (r = s, s = o = void 0) : e.isObject(o) && (r = o, o = void 0), !(
|
|
1570
|
+
function n(f, u, a, t, s, o, r, l, d) {
|
|
1571
|
+
if (e.isObject(s) ? (r = s, s = o = void 0) : e.isObject(o) && (r = o, o = void 0), !(u === void 0 || e.isString(u)))
|
|
1564
1572
|
throw TypeError("type must be a string");
|
|
1565
|
-
if (!e.isString(
|
|
1573
|
+
if (!e.isString(a))
|
|
1566
1574
|
throw TypeError("requestType must be a string");
|
|
1567
1575
|
if (!e.isString(t))
|
|
1568
1576
|
throw TypeError("responseType must be a string");
|
|
1569
|
-
i.call(this,
|
|
1577
|
+
i.call(this, f, r), this.type = u || "rpc", this.requestType = a, this.requestStream = s ? !0 : void 0, this.responseType = t, this.responseStream = o ? !0 : void 0, this.resolvedRequestType = null, this.resolvedResponseType = null, this.comment = l, this.parsedOptions = d;
|
|
1570
1578
|
}
|
|
1571
|
-
return n.fromJSON = function(
|
|
1572
|
-
return new n(
|
|
1573
|
-
}, n.prototype.toJSON = function(
|
|
1574
|
-
var
|
|
1579
|
+
return n.fromJSON = function(u, a) {
|
|
1580
|
+
return new n(u, a.type, a.requestType, a.responseType, a.requestStream, a.responseStream, a.options, a.comment, a.parsedOptions);
|
|
1581
|
+
}, n.prototype.toJSON = function(u) {
|
|
1582
|
+
var a = u ? !!u.keepComments : !1;
|
|
1575
1583
|
return e.toObject([
|
|
1576
1584
|
"type",
|
|
1577
1585
|
this.type !== "rpc" && /* istanbul ignore next */
|
|
@@ -1587,7 +1595,7 @@ function requireMethod() {
|
|
|
1587
1595
|
"options",
|
|
1588
1596
|
this.options,
|
|
1589
1597
|
"comment",
|
|
1590
|
-
|
|
1598
|
+
a ? this.comment : void 0,
|
|
1591
1599
|
"parsedOptions",
|
|
1592
1600
|
this.parsedOptions
|
|
1593
1601
|
]);
|
|
@@ -1598,20 +1606,20 @@ function requireMethod() {
|
|
|
1598
1606
|
var service, hasRequiredService;
|
|
1599
1607
|
function requireService() {
|
|
1600
1608
|
if (hasRequiredService) return service;
|
|
1601
|
-
hasRequiredService = 1, service =
|
|
1609
|
+
hasRequiredService = 1, service = u;
|
|
1602
1610
|
var i = requireNamespace();
|
|
1603
|
-
((
|
|
1604
|
-
var e = requireMethod(), n = requireUtil(),
|
|
1605
|
-
function
|
|
1611
|
+
((u.prototype = Object.create(i.prototype)).constructor = u).className = "Service";
|
|
1612
|
+
var e = requireMethod(), n = requireUtil(), f = rpc;
|
|
1613
|
+
function u(t, s) {
|
|
1606
1614
|
i.call(this, t, s), this.methods = {}, this._methodsArray = null;
|
|
1607
1615
|
}
|
|
1608
|
-
|
|
1609
|
-
var r = new
|
|
1616
|
+
u.fromJSON = function(s, o) {
|
|
1617
|
+
var r = new u(s, o.options);
|
|
1610
1618
|
if (o.methods)
|
|
1611
1619
|
for (var l = Object.keys(o.methods), d = 0; d < l.length; ++d)
|
|
1612
1620
|
r.add(e.fromJSON(l[d], o.methods[l[d]]));
|
|
1613
1621
|
return o.nested && r.addJSON(o.nested), r.comment = o.comment, r;
|
|
1614
|
-
},
|
|
1622
|
+
}, u.prototype.toJSON = function(s) {
|
|
1615
1623
|
var o = i.prototype.toJSON.call(this, s), r = s ? !!s.keepComments : !1;
|
|
1616
1624
|
return n.toObject([
|
|
1617
1625
|
"options",
|
|
@@ -1624,39 +1632,39 @@ function requireService() {
|
|
|
1624
1632
|
"comment",
|
|
1625
1633
|
r ? this.comment : void 0
|
|
1626
1634
|
]);
|
|
1627
|
-
}, Object.defineProperty(
|
|
1635
|
+
}, Object.defineProperty(u.prototype, "methodsArray", {
|
|
1628
1636
|
get: function() {
|
|
1629
1637
|
return this._methodsArray || (this._methodsArray = n.toArray(this.methods));
|
|
1630
1638
|
}
|
|
1631
1639
|
});
|
|
1632
|
-
function
|
|
1640
|
+
function a(t) {
|
|
1633
1641
|
return t._methodsArray = null, t;
|
|
1634
1642
|
}
|
|
1635
|
-
return
|
|
1643
|
+
return u.prototype.get = function(s) {
|
|
1636
1644
|
return this.methods[s] || i.prototype.get.call(this, s);
|
|
1637
|
-
},
|
|
1645
|
+
}, u.prototype.resolveAll = function() {
|
|
1638
1646
|
for (var s = this.methodsArray, o = 0; o < s.length; ++o)
|
|
1639
1647
|
s[o].resolve();
|
|
1640
1648
|
return i.prototype.resolve.call(this);
|
|
1641
|
-
},
|
|
1649
|
+
}, u.prototype.add = function(s) {
|
|
1642
1650
|
if (this.get(s.name))
|
|
1643
1651
|
throw Error("duplicate name '" + s.name + "' in " + this);
|
|
1644
|
-
return s instanceof e ? (this.methods[s.name] = s, s.parent = this,
|
|
1645
|
-
},
|
|
1652
|
+
return s instanceof e ? (this.methods[s.name] = s, s.parent = this, a(this)) : i.prototype.add.call(this, s);
|
|
1653
|
+
}, u.prototype.remove = function(s) {
|
|
1646
1654
|
if (s instanceof e) {
|
|
1647
1655
|
if (this.methods[s.name] !== s)
|
|
1648
1656
|
throw Error(s + " is not a member of " + this);
|
|
1649
|
-
return delete this.methods[s.name], s.parent = null,
|
|
1657
|
+
return delete this.methods[s.name], s.parent = null, a(this);
|
|
1650
1658
|
}
|
|
1651
1659
|
return i.prototype.remove.call(this, s);
|
|
1652
|
-
},
|
|
1653
|
-
for (var l = new
|
|
1660
|
+
}, u.prototype.create = function(s, o, r) {
|
|
1661
|
+
for (var l = new f.Service(s, o, r), d = 0, h; d < /* initializes */
|
|
1654
1662
|
this.methodsArray.length; ++d) {
|
|
1655
|
-
var
|
|
1656
|
-
l[
|
|
1657
|
-
m:
|
|
1658
|
-
q:
|
|
1659
|
-
s:
|
|
1663
|
+
var c = n.lcFirst((h = this._methodsArray[d]).resolve().name).replace(/[^$\w_]/g, "");
|
|
1664
|
+
l[c] = n.codegen(["r", "c"], n.isReserved(c) ? c + "_" : c)("return this.rpcCall(m,q,s,r,c)")({
|
|
1665
|
+
m: h,
|
|
1666
|
+
q: h.resolvedRequestType.ctor,
|
|
1667
|
+
s: h.resolvedResponseType.ctor
|
|
1660
1668
|
});
|
|
1661
1669
|
}
|
|
1662
1670
|
return l;
|
|
@@ -1698,24 +1706,24 @@ Message.prototype.toJSON = function i() {
|
|
|
1698
1706
|
var decoder_1, hasRequiredDecoder;
|
|
1699
1707
|
function requireDecoder() {
|
|
1700
1708
|
if (hasRequiredDecoder) return decoder_1;
|
|
1701
|
-
hasRequiredDecoder = 1, decoder_1 =
|
|
1709
|
+
hasRequiredDecoder = 1, decoder_1 = u;
|
|
1702
1710
|
var i = require_enum(), e = requireTypes(), n = requireUtil();
|
|
1703
|
-
function a
|
|
1704
|
-
return "missing required '" +
|
|
1711
|
+
function f(a) {
|
|
1712
|
+
return "missing required '" + a.name + "'";
|
|
1705
1713
|
}
|
|
1706
|
-
function
|
|
1707
|
-
var t = n.codegen(["r", "l"],
|
|
1708
|
-
return
|
|
1714
|
+
function u(a) {
|
|
1715
|
+
var t = n.codegen(["r", "l"], a.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (a.fieldsArray.filter(function(h) {
|
|
1716
|
+
return h.map;
|
|
1709
1717
|
}).length ? ",k,value" : ""))("while(r.pos<c){")("var t=r.uint32()");
|
|
1710
|
-
|
|
1718
|
+
a.group && t("if((t&7)===4)")("break"), t("switch(t>>>3){");
|
|
1711
1719
|
for (var s = 0; s < /* initializes */
|
|
1712
|
-
|
|
1713
|
-
var o =
|
|
1720
|
+
a.fieldsArray.length; ++s) {
|
|
1721
|
+
var o = a._fieldsArray[s].resolve(), r = o.resolvedType instanceof i ? "int32" : o.type, l = "m" + n.safeProp(o.name);
|
|
1714
1722
|
t("case %i: {", o.id), o.map ? (t("if(%s===util.emptyObject)", l)("%s={}", l)("var c2 = r.uint32()+r.pos"), e.defaults[o.keyType] !== void 0 ? t("k=%j", e.defaults[o.keyType]) : t("k=null"), e.defaults[r] !== void 0 ? t("value=%j", e.defaults[r]) : t("value=null"), t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break", o.keyType)("case 2:"), e.basic[r] === void 0 ? t("value=types[%i].decode(r,r.uint32())", s) : t("value=r.%s()", r), t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"), e.long[o.keyType] !== void 0 ? t('%s[typeof k==="object"?util.longToHash(k):k]=value', l) : t("%s[k]=value", l)) : o.repeated ? (t("if(!(%s&&%s.length))", l, l)("%s=[]", l), e.packed[r] !== void 0 && t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())", l, r)("}else"), e.basic[r] === void 0 ? t(o.resolvedType.group ? "%s.push(types[%i].decode(r))" : "%s.push(types[%i].decode(r,r.uint32()))", l, s) : t("%s.push(r.%s())", l, r)) : e.basic[r] === void 0 ? t(o.resolvedType.group ? "%s=types[%i].decode(r)" : "%s=types[%i].decode(r,r.uint32())", l, s) : t("%s=r.%s()", l, r), t("break")("}");
|
|
1715
1723
|
}
|
|
1716
|
-
for (t("default:")("r.skipType(t&7)")("break")("}")("}"), s = 0; s <
|
|
1717
|
-
var d =
|
|
1718
|
-
d.required && t("if(!m.hasOwnProperty(%j))", d.name)("throw util.ProtocolError(%j,{instance:m})",
|
|
1724
|
+
for (t("default:")("r.skipType(t&7)")("break")("}")("}"), s = 0; s < a._fieldsArray.length; ++s) {
|
|
1725
|
+
var d = a._fieldsArray[s];
|
|
1726
|
+
d.required && t("if(!m.hasOwnProperty(%j))", d.name)("throw util.ProtocolError(%j,{instance:m})", f(d));
|
|
1719
1727
|
}
|
|
1720
1728
|
return t("return m");
|
|
1721
1729
|
}
|
|
@@ -1724,12 +1732,12 @@ function requireDecoder() {
|
|
|
1724
1732
|
var verifier_1, hasRequiredVerifier;
|
|
1725
1733
|
function requireVerifier() {
|
|
1726
1734
|
if (hasRequiredVerifier) return verifier_1;
|
|
1727
|
-
hasRequiredVerifier = 1, verifier_1 =
|
|
1735
|
+
hasRequiredVerifier = 1, verifier_1 = a;
|
|
1728
1736
|
var i = require_enum(), e = requireUtil();
|
|
1729
1737
|
function n(t, s) {
|
|
1730
1738
|
return t.name + ": " + s + (t.repeated && s !== "array" ? "[]" : t.map && s !== "object" ? "{k:" + t.keyType + "}" : "") + " expected";
|
|
1731
1739
|
}
|
|
1732
|
-
function
|
|
1740
|
+
function f(t, s, o, r) {
|
|
1733
1741
|
if (s.resolvedType)
|
|
1734
1742
|
if (s.resolvedType instanceof i) {
|
|
1735
1743
|
t("switch(%s){", r)("default:")("return%j", n(s, "enum value"));
|
|
@@ -1769,7 +1777,7 @@ function requireVerifier() {
|
|
|
1769
1777
|
}
|
|
1770
1778
|
return t;
|
|
1771
1779
|
}
|
|
1772
|
-
function
|
|
1780
|
+
function u(t, s, o) {
|
|
1773
1781
|
switch (s.keyType) {
|
|
1774
1782
|
case "int32":
|
|
1775
1783
|
case "uint32":
|
|
@@ -1791,22 +1799,22 @@ function requireVerifier() {
|
|
|
1791
1799
|
}
|
|
1792
1800
|
return t;
|
|
1793
1801
|
}
|
|
1794
|
-
function
|
|
1802
|
+
function a(t) {
|
|
1795
1803
|
var s = e.codegen(["m"], t.name + "$verify")('if(typeof m!=="object"||m===null)')("return%j", "object expected"), o = t.oneofsArray, r = {};
|
|
1796
1804
|
o.length && s("var p={}");
|
|
1797
1805
|
for (var l = 0; l < /* initializes */
|
|
1798
1806
|
t.fieldsArray.length; ++l) {
|
|
1799
|
-
var d = t._fieldsArray[l].resolve(),
|
|
1800
|
-
if (d.optional && s("if(%s!=null&&m.hasOwnProperty(%j)){",
|
|
1801
|
-
s("if(!util.isObject(%s))",
|
|
1807
|
+
var d = t._fieldsArray[l].resolve(), h = "m" + e.safeProp(d.name);
|
|
1808
|
+
if (d.optional && s("if(%s!=null&&m.hasOwnProperty(%j)){", h, d.name), d.map)
|
|
1809
|
+
s("if(!util.isObject(%s))", h)("return%j", n(d, "object"))("var k=Object.keys(%s)", h)("for(var i=0;i<k.length;++i){"), u(s, d, "k[i]"), f(s, d, l, h + "[k[i]]")("}");
|
|
1802
1810
|
else if (d.repeated)
|
|
1803
|
-
s("if(!Array.isArray(%s))",
|
|
1811
|
+
s("if(!Array.isArray(%s))", h)("return%j", n(d, "array"))("for(var i=0;i<%s.length;++i){", h), f(s, d, l, h + "[i]")("}");
|
|
1804
1812
|
else {
|
|
1805
1813
|
if (d.partOf) {
|
|
1806
|
-
var
|
|
1807
|
-
r[d.partOf.name] === 1 && s("if(p%s===1)",
|
|
1814
|
+
var c = e.safeProp(d.partOf.name);
|
|
1815
|
+
r[d.partOf.name] === 1 && s("if(p%s===1)", c)("return%j", d.partOf.name + ": multiple values"), r[d.partOf.name] = 1, s("p%s=1", c);
|
|
1808
1816
|
}
|
|
1809
|
-
|
|
1817
|
+
f(s, d, l, h);
|
|
1810
1818
|
}
|
|
1811
1819
|
d.optional && s("}");
|
|
1812
1820
|
}
|
|
@@ -1817,14 +1825,14 @@ function requireVerifier() {
|
|
|
1817
1825
|
var converter = {}, hasRequiredConverter;
|
|
1818
1826
|
function requireConverter() {
|
|
1819
1827
|
return hasRequiredConverter || (hasRequiredConverter = 1, function(i) {
|
|
1820
|
-
var e = i, n = require_enum(),
|
|
1821
|
-
function
|
|
1828
|
+
var e = i, n = require_enum(), f = requireUtil();
|
|
1829
|
+
function u(t, s, o, r) {
|
|
1822
1830
|
var l = !1;
|
|
1823
1831
|
if (s.resolvedType)
|
|
1824
1832
|
if (s.resolvedType instanceof n) {
|
|
1825
1833
|
t("switch(d%s){", r);
|
|
1826
|
-
for (var d = s.resolvedType.values,
|
|
1827
|
-
d[c
|
|
1834
|
+
for (var d = s.resolvedType.values, h = Object.keys(d), c = 0; c < h.length; ++c)
|
|
1835
|
+
d[h[c]] === s.typeDefault && !l && (t("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}', r, r, r), s.repeated || t("break"), l = !0), t("case%j:", h[c])("case %i:", d[h[c]])("m%s=%j", r, d[h[c]])("break");
|
|
1828
1836
|
t("}");
|
|
1829
1837
|
} else t('if(typeof d%s!=="object")', r)("throw TypeError(%j)", s.fullName + ": object expected")("m%s=types[%i].fromObject(d%s)", r, o, r);
|
|
1830
1838
|
else {
|
|
@@ -1865,34 +1873,34 @@ function requireConverter() {
|
|
|
1865
1873
|
return t;
|
|
1866
1874
|
}
|
|
1867
1875
|
e.fromObject = function(s) {
|
|
1868
|
-
var o = s.fieldsArray, r =
|
|
1876
|
+
var o = s.fieldsArray, r = f.codegen(["d"], s.name + "$fromObject")("if(d instanceof this.ctor)")("return d");
|
|
1869
1877
|
if (!o.length) return r("return new this.ctor");
|
|
1870
1878
|
r("var m=new this.ctor");
|
|
1871
1879
|
for (var l = 0; l < o.length; ++l) {
|
|
1872
|
-
var d = o[l].resolve(),
|
|
1873
|
-
d.map ? (r("if(d%s){",
|
|
1880
|
+
var d = o[l].resolve(), h = f.safeProp(d.name);
|
|
1881
|
+
d.map ? (r("if(d%s){", h)('if(typeof d%s!=="object")', h)("throw TypeError(%j)", d.fullName + ": object expected")("m%s={}", h)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", h), u(
|
|
1874
1882
|
r,
|
|
1875
1883
|
d,
|
|
1876
1884
|
/* not sorted */
|
|
1877
1885
|
l,
|
|
1878
|
-
|
|
1879
|
-
)("}")("}")) : d.repeated ? (r("if(d%s){",
|
|
1886
|
+
h + "[ks[i]]"
|
|
1887
|
+
)("}")("}")) : d.repeated ? (r("if(d%s){", h)("if(!Array.isArray(d%s))", h)("throw TypeError(%j)", d.fullName + ": array expected")("m%s=[]", h)("for(var i=0;i<d%s.length;++i){", h), u(
|
|
1880
1888
|
r,
|
|
1881
1889
|
d,
|
|
1882
1890
|
/* not sorted */
|
|
1883
1891
|
l,
|
|
1884
|
-
|
|
1885
|
-
)("}")("}")) : (d.resolvedType instanceof n || r("if(d%s!=null){",
|
|
1892
|
+
h + "[i]"
|
|
1893
|
+
)("}")("}")) : (d.resolvedType instanceof n || r("if(d%s!=null){", h), u(
|
|
1886
1894
|
r,
|
|
1887
1895
|
d,
|
|
1888
1896
|
/* not sorted */
|
|
1889
1897
|
l,
|
|
1890
|
-
|
|
1898
|
+
h
|
|
1891
1899
|
), d.resolvedType instanceof n || r("}"));
|
|
1892
1900
|
}
|
|
1893
1901
|
return r("return m");
|
|
1894
1902
|
};
|
|
1895
|
-
function
|
|
1903
|
+
function a(t, s, o, r) {
|
|
1896
1904
|
if (s.resolvedType)
|
|
1897
1905
|
s.resolvedType instanceof n ? t("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s", r, o, r, r, o, r, r) : t("d%s=types[%i].toObject(m%s,o)", r, o, r);
|
|
1898
1906
|
else {
|
|
@@ -1921,22 +1929,22 @@ function requireConverter() {
|
|
|
1921
1929
|
return t;
|
|
1922
1930
|
}
|
|
1923
1931
|
e.toObject = function(s) {
|
|
1924
|
-
var o = s.fieldsArray.slice().sort(
|
|
1932
|
+
var o = s.fieldsArray.slice().sort(f.compareFieldsById);
|
|
1925
1933
|
if (!o.length)
|
|
1926
|
-
return
|
|
1927
|
-
for (var r =
|
|
1928
|
-
o[
|
|
1934
|
+
return f.codegen()("return {}");
|
|
1935
|
+
for (var r = f.codegen(["m", "o"], s.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], d = [], h = [], c = 0; c < o.length; ++c)
|
|
1936
|
+
o[c].partOf || (o[c].resolve().repeated ? l : o[c].map ? d : h).push(o[c]);
|
|
1929
1937
|
if (l.length) {
|
|
1930
|
-
for (r("if(o.arrays||o.defaults){"),
|
|
1938
|
+
for (r("if(o.arrays||o.defaults){"), c = 0; c < l.length; ++c) r("d%s=[]", f.safeProp(l[c].name));
|
|
1931
1939
|
r("}");
|
|
1932
1940
|
}
|
|
1933
1941
|
if (d.length) {
|
|
1934
|
-
for (r("if(o.objects||o.defaults){"),
|
|
1942
|
+
for (r("if(o.objects||o.defaults){"), c = 0; c < d.length; ++c) r("d%s={}", f.safeProp(d[c].name));
|
|
1935
1943
|
r("}");
|
|
1936
1944
|
}
|
|
1937
|
-
if (
|
|
1938
|
-
for (r("if(o.defaults){"),
|
|
1939
|
-
var p = c
|
|
1945
|
+
if (h.length) {
|
|
1946
|
+
for (r("if(o.defaults){"), c = 0; c < h.length; ++c) {
|
|
1947
|
+
var p = h[c], m = f.safeProp(p.name);
|
|
1940
1948
|
if (p.resolvedType instanceof n) r("d%s=o.enums===String?%j:%j", m, p.resolvedType.valuesById[p.typeDefault], p.typeDefault);
|
|
1941
1949
|
else if (p.long) r("if(util.Long){")("var n=new util.Long(%i,%i,%j)", p.typeDefault.low, p.typeDefault.high, p.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n", m)("}else")("d%s=o.longs===String?%j:%i", m, p.typeDefault.toString(), p.typeDefault.toNumber());
|
|
1942
1950
|
else if (p.bytes) {
|
|
@@ -1947,27 +1955,27 @@ function requireConverter() {
|
|
|
1947
1955
|
r("}");
|
|
1948
1956
|
}
|
|
1949
1957
|
var v = !1;
|
|
1950
|
-
for (
|
|
1951
|
-
var p = o[
|
|
1952
|
-
p.map ? (v || (v = !0, r("var ks2")), r("if(m%s&&(ks2=Object.keys(m%s)).length){", m, m)("d%s={}", m)("for(var j=0;j<ks2.length;++j){"),
|
|
1958
|
+
for (c = 0; c < o.length; ++c) {
|
|
1959
|
+
var p = o[c], y = s._fieldsArray.indexOf(p), m = f.safeProp(p.name);
|
|
1960
|
+
p.map ? (v || (v = !0, r("var ks2")), r("if(m%s&&(ks2=Object.keys(m%s)).length){", m, m)("d%s={}", m)("for(var j=0;j<ks2.length;++j){"), a(
|
|
1953
1961
|
r,
|
|
1954
1962
|
p,
|
|
1955
1963
|
/* sorted */
|
|
1956
1964
|
y,
|
|
1957
1965
|
m + "[ks2[j]]"
|
|
1958
|
-
)("}")) : p.repeated ? (r("if(m%s&&m%s.length){", m, m)("d%s=[]", m)("for(var j=0;j<m%s.length;++j){", m),
|
|
1966
|
+
)("}")) : p.repeated ? (r("if(m%s&&m%s.length){", m, m)("d%s=[]", m)("for(var j=0;j<m%s.length;++j){", m), a(
|
|
1959
1967
|
r,
|
|
1960
1968
|
p,
|
|
1961
1969
|
/* sorted */
|
|
1962
1970
|
y,
|
|
1963
1971
|
m + "[j]"
|
|
1964
|
-
)("}")) : (r("if(m%s!=null&&m.hasOwnProperty(%j)){", m, p.name),
|
|
1972
|
+
)("}")) : (r("if(m%s!=null&&m.hasOwnProperty(%j)){", m, p.name), a(
|
|
1965
1973
|
r,
|
|
1966
1974
|
p,
|
|
1967
1975
|
/* sorted */
|
|
1968
1976
|
y,
|
|
1969
1977
|
m
|
|
1970
|
-
), p.partOf && r("if(o.oneofs)")("d%s=%j",
|
|
1978
|
+
), p.partOf && r("if(o.oneofs)")("d%s=%j", f.safeProp(p.partOf.name), p.name)), r("}");
|
|
1971
1979
|
}
|
|
1972
1980
|
return r("return d");
|
|
1973
1981
|
};
|
|
@@ -1977,31 +1985,31 @@ var wrappers = {};
|
|
|
1977
1985
|
(function(i) {
|
|
1978
1986
|
var e = i, n = message;
|
|
1979
1987
|
e[".google.protobuf.Any"] = {
|
|
1980
|
-
fromObject: function(
|
|
1981
|
-
if (
|
|
1982
|
-
var
|
|
1983
|
-
if (
|
|
1984
|
-
var t =
|
|
1988
|
+
fromObject: function(f) {
|
|
1989
|
+
if (f && f["@type"]) {
|
|
1990
|
+
var u = f["@type"].substring(f["@type"].lastIndexOf("/") + 1), a = this.lookup(u);
|
|
1991
|
+
if (a) {
|
|
1992
|
+
var t = f["@type"].charAt(0) === "." ? f["@type"].slice(1) : f["@type"];
|
|
1985
1993
|
return t.indexOf("/") === -1 && (t = "/" + t), this.create({
|
|
1986
1994
|
type_url: t,
|
|
1987
|
-
value:
|
|
1995
|
+
value: a.encode(a.fromObject(f)).finish()
|
|
1988
1996
|
});
|
|
1989
1997
|
}
|
|
1990
1998
|
}
|
|
1991
|
-
return this.fromObject(
|
|
1999
|
+
return this.fromObject(f);
|
|
1992
2000
|
},
|
|
1993
|
-
toObject: function(
|
|
1994
|
-
var
|
|
1995
|
-
if (
|
|
1996
|
-
s =
|
|
2001
|
+
toObject: function(f, u) {
|
|
2002
|
+
var a = "type.googleapis.com/", t = "", s = "";
|
|
2003
|
+
if (u && u.json && f.type_url && f.value) {
|
|
2004
|
+
s = f.type_url.substring(f.type_url.lastIndexOf("/") + 1), t = f.type_url.substring(0, f.type_url.lastIndexOf("/") + 1);
|
|
1997
2005
|
var o = this.lookup(s);
|
|
1998
|
-
o && (
|
|
2006
|
+
o && (f = o.decode(f.value));
|
|
1999
2007
|
}
|
|
2000
|
-
if (!(
|
|
2001
|
-
var r =
|
|
2002
|
-
return t === "" && (t =
|
|
2008
|
+
if (!(f instanceof this.ctor) && f instanceof n) {
|
|
2009
|
+
var r = f.$type.toObject(f, u), l = f.$type.fullName[0] === "." ? f.$type.fullName.slice(1) : f.$type.fullName;
|
|
2010
|
+
return t === "" && (t = a), s = t + l, r["@type"] = s, r;
|
|
2003
2011
|
}
|
|
2004
|
-
return this.toObject(
|
|
2012
|
+
return this.toObject(f, u);
|
|
2005
2013
|
}
|
|
2006
2014
|
};
|
|
2007
2015
|
})(wrappers);
|
|
@@ -2011,7 +2019,7 @@ function requireType() {
|
|
|
2011
2019
|
hasRequiredType = 1, type = m;
|
|
2012
2020
|
var i = requireNamespace();
|
|
2013
2021
|
((m.prototype = Object.create(i.prototype)).constructor = m).className = "Type";
|
|
2014
|
-
var e = require_enum(), n = requireOneof(),
|
|
2022
|
+
var e = require_enum(), n = requireOneof(), f = requireField(), u = requireMapfield(), a = requireService(), t = message, s = reader, o = writer, r = requireUtil(), l = requireEncoder(), d = requireDecoder(), h = requireVerifier(), c = requireConverter(), p = wrappers;
|
|
2015
2023
|
function m(v, y) {
|
|
2016
2024
|
i.call(this, v, y), this.fields = {}, this.oneofs = void 0, this.extensions = void 0, this.reserved = void 0, this.group = void 0, this._fieldsById = null, this._fieldsArray = null, this._oneofsArray = null, this._ctor = null;
|
|
2017
2025
|
}
|
|
@@ -2097,7 +2105,7 @@ function requireType() {
|
|
|
2097
2105
|
b.extensions = g.extensions, b.reserved = g.reserved;
|
|
2098
2106
|
for (var R = Object.keys(g.fields), O = 0; O < R.length; ++O)
|
|
2099
2107
|
b.add(
|
|
2100
|
-
(typeof g.fields[R[O]].keyType < "u" ?
|
|
2108
|
+
(typeof g.fields[R[O]].keyType < "u" ? u.fromJSON : f.fromJSON)(R[O], g.fields[R[O]])
|
|
2101
2109
|
);
|
|
2102
2110
|
if (g.oneofs)
|
|
2103
2111
|
for (R = Object.keys(g.oneofs), O = 0; O < R.length; ++O)
|
|
@@ -2107,7 +2115,7 @@ function requireType() {
|
|
|
2107
2115
|
var T = g.nested[R[O]];
|
|
2108
2116
|
b.add(
|
|
2109
2117
|
// most to least likely
|
|
2110
|
-
(T.id !== void 0 ?
|
|
2118
|
+
(T.id !== void 0 ? f.fromJSON : T.fields !== void 0 ? m.fromJSON : T.values !== void 0 ? e.fromJSON : T.methods !== void 0 ? a.fromJSON : i.fromJSON)(R[O], T)
|
|
2111
2119
|
);
|
|
2112
2120
|
}
|
|
2113
2121
|
return g.extensions && g.extensions.length && (b.extensions = g.extensions), g.reserved && g.reserved.length && (b.reserved = g.reserved), g.group && (b.group = !0), g.comment && (b.comment = g.comment), b;
|
|
@@ -2145,7 +2153,7 @@ function requireType() {
|
|
|
2145
2153
|
}, m.prototype.add = function(y) {
|
|
2146
2154
|
if (this.get(y.name))
|
|
2147
2155
|
throw Error("duplicate name '" + y.name + "' in " + this);
|
|
2148
|
-
if (y instanceof
|
|
2156
|
+
if (y instanceof f && y.extend === void 0) {
|
|
2149
2157
|
if (this._fieldsById ? (
|
|
2150
2158
|
/* istanbul ignore next */
|
|
2151
2159
|
this._fieldsById[y.id]
|
|
@@ -2159,7 +2167,7 @@ function requireType() {
|
|
|
2159
2167
|
}
|
|
2160
2168
|
return y instanceof n ? (this.oneofs || (this.oneofs = {}), this.oneofs[y.name] = y, y.onAdd(this), _(this)) : i.prototype.add.call(this, y);
|
|
2161
2169
|
}, m.prototype.remove = function(y) {
|
|
2162
|
-
if (y instanceof
|
|
2170
|
+
if (y instanceof f && y.extend === void 0) {
|
|
2163
2171
|
if (!this.fields || this.fields[y.name] !== y)
|
|
2164
2172
|
throw Error(y + " is not a member of " + this);
|
|
2165
2173
|
return delete this.fields[y.name], y.parent = null, y.onRemove(this), _(this);
|
|
@@ -2188,13 +2196,13 @@ function requireType() {
|
|
|
2188
2196
|
Reader: s,
|
|
2189
2197
|
types: g,
|
|
2190
2198
|
util: r
|
|
2191
|
-
}), this.verify =
|
|
2199
|
+
}), this.verify = h(this)({
|
|
2192
2200
|
types: g,
|
|
2193
2201
|
util: r
|
|
2194
|
-
}), this.fromObject =
|
|
2202
|
+
}), this.fromObject = c.fromObject(this)({
|
|
2195
2203
|
types: g,
|
|
2196
2204
|
util: r
|
|
2197
|
-
}), this.toObject =
|
|
2205
|
+
}), this.toObject = c.toObject(this)({
|
|
2198
2206
|
types: g,
|
|
2199
2207
|
util: r
|
|
2200
2208
|
});
|
|
@@ -2230,57 +2238,57 @@ function requireRoot() {
|
|
|
2230
2238
|
hasRequiredRoot = 1, root = o;
|
|
2231
2239
|
var i = requireNamespace();
|
|
2232
2240
|
((o.prototype = Object.create(i.prototype)).constructor = o).className = "Root";
|
|
2233
|
-
var e = requireField(), n = require_enum(),
|
|
2234
|
-
function o(
|
|
2235
|
-
i.call(this, "",
|
|
2241
|
+
var e = requireField(), n = require_enum(), f = requireOneof(), u = requireUtil(), a, t, s;
|
|
2242
|
+
function o(h) {
|
|
2243
|
+
i.call(this, "", h), this.deferred = [], this.files = [];
|
|
2236
2244
|
}
|
|
2237
|
-
o.fromJSON = function(
|
|
2238
|
-
return p || (p = new o()),
|
|
2239
|
-
}, o.prototype.resolvePath =
|
|
2245
|
+
o.fromJSON = function(c, p) {
|
|
2246
|
+
return p || (p = new o()), c.options && p.setOptions(c.options), p.addJSON(c.nested);
|
|
2247
|
+
}, o.prototype.resolvePath = u.path.resolve, o.prototype.fetch = u.fetch;
|
|
2240
2248
|
function r() {
|
|
2241
2249
|
}
|
|
2242
|
-
o.prototype.load = function c
|
|
2250
|
+
o.prototype.load = function h(c, p, m) {
|
|
2243
2251
|
typeof p == "function" && (m = p, p = void 0);
|
|
2244
2252
|
var _ = this;
|
|
2245
2253
|
if (!m)
|
|
2246
|
-
return
|
|
2254
|
+
return u.asPromise(h, _, c, p);
|
|
2247
2255
|
var v = m === r;
|
|
2248
|
-
function y(q,
|
|
2256
|
+
function y(q, k) {
|
|
2249
2257
|
if (m) {
|
|
2250
2258
|
if (v)
|
|
2251
2259
|
throw q;
|
|
2252
|
-
var
|
|
2253
|
-
m = null,
|
|
2260
|
+
var A = m;
|
|
2261
|
+
m = null, A(q, k);
|
|
2254
2262
|
}
|
|
2255
2263
|
}
|
|
2256
2264
|
function g(q) {
|
|
2257
|
-
var
|
|
2258
|
-
if (
|
|
2259
|
-
var
|
|
2260
|
-
if (
|
|
2265
|
+
var k = q.lastIndexOf("google/protobuf/");
|
|
2266
|
+
if (k > -1) {
|
|
2267
|
+
var A = q.substring(k);
|
|
2268
|
+
if (A in s) return A;
|
|
2261
2269
|
}
|
|
2262
2270
|
return null;
|
|
2263
2271
|
}
|
|
2264
|
-
function b(q,
|
|
2272
|
+
function b(q, k) {
|
|
2265
2273
|
try {
|
|
2266
|
-
if (
|
|
2267
|
-
_.setOptions(
|
|
2274
|
+
if (u.isString(k) && k.charAt(0) === "{" && (k = JSON.parse(k)), !u.isString(k))
|
|
2275
|
+
_.setOptions(k.options).addJSON(k.nested);
|
|
2268
2276
|
else {
|
|
2269
2277
|
t.filename = q;
|
|
2270
|
-
var
|
|
2271
|
-
if (
|
|
2272
|
-
for (; E <
|
|
2273
|
-
(B = g(
|
|
2274
|
-
if (
|
|
2275
|
-
for (E = 0; E <
|
|
2276
|
-
(B = g(
|
|
2278
|
+
var A = t(k, _, p), B, E = 0;
|
|
2279
|
+
if (A.imports)
|
|
2280
|
+
for (; E < A.imports.length; ++E)
|
|
2281
|
+
(B = g(A.imports[E]) || _.resolvePath(q, A.imports[E])) && R(B);
|
|
2282
|
+
if (A.weakImports)
|
|
2283
|
+
for (E = 0; E < A.weakImports.length; ++E)
|
|
2284
|
+
(B = g(A.weakImports[E]) || _.resolvePath(q, A.weakImports[E])) && R(B, !0);
|
|
2277
2285
|
}
|
|
2278
2286
|
} catch (V) {
|
|
2279
2287
|
y(V);
|
|
2280
2288
|
}
|
|
2281
2289
|
!v && !O && y(null, _);
|
|
2282
2290
|
}
|
|
2283
|
-
function R(q,
|
|
2291
|
+
function R(q, k) {
|
|
2284
2292
|
if (q = g(q) || q, !(_.files.indexOf(q) > -1)) {
|
|
2285
2293
|
if (_.files.push(q), q in s) {
|
|
2286
2294
|
v ? b(q, s[q]) : (++O, setTimeout(function() {
|
|
@@ -2289,19 +2297,19 @@ function requireRoot() {
|
|
|
2289
2297
|
return;
|
|
2290
2298
|
}
|
|
2291
2299
|
if (v) {
|
|
2292
|
-
var
|
|
2300
|
+
var A;
|
|
2293
2301
|
try {
|
|
2294
|
-
|
|
2302
|
+
A = u.fs.readFileSync(q).toString("utf8");
|
|
2295
2303
|
} catch (B) {
|
|
2296
|
-
|
|
2304
|
+
k || y(B);
|
|
2297
2305
|
return;
|
|
2298
2306
|
}
|
|
2299
|
-
b(q,
|
|
2307
|
+
b(q, A);
|
|
2300
2308
|
} else
|
|
2301
2309
|
++O, _.fetch(q, function(B, E) {
|
|
2302
2310
|
if (--O, !!m) {
|
|
2303
2311
|
if (B) {
|
|
2304
|
-
|
|
2312
|
+
k ? O || y(null, _) : y(B);
|
|
2305
2313
|
return;
|
|
2306
2314
|
}
|
|
2307
2315
|
b(q, E);
|
|
@@ -2310,99 +2318,99 @@ function requireRoot() {
|
|
|
2310
2318
|
}
|
|
2311
2319
|
}
|
|
2312
2320
|
var O = 0;
|
|
2313
|
-
|
|
2314
|
-
for (var T = 0, J; T <
|
|
2315
|
-
(J = _.resolvePath("",
|
|
2321
|
+
u.isString(c) && (c = [c]);
|
|
2322
|
+
for (var T = 0, J; T < c.length; ++T)
|
|
2323
|
+
(J = _.resolvePath("", c[T])) && R(J);
|
|
2316
2324
|
if (v)
|
|
2317
2325
|
return _;
|
|
2318
2326
|
O || y(null, _);
|
|
2319
|
-
}, o.prototype.loadSync = function(
|
|
2320
|
-
if (!
|
|
2327
|
+
}, o.prototype.loadSync = function(c, p) {
|
|
2328
|
+
if (!u.isNode)
|
|
2321
2329
|
throw Error("not supported");
|
|
2322
|
-
return this.load(
|
|
2330
|
+
return this.load(c, p, r);
|
|
2323
2331
|
}, o.prototype.resolveAll = function() {
|
|
2324
2332
|
if (this.deferred.length)
|
|
2325
|
-
throw Error("unresolvable extensions: " + this.deferred.map(function(
|
|
2326
|
-
return "'extend " +
|
|
2333
|
+
throw Error("unresolvable extensions: " + this.deferred.map(function(c) {
|
|
2334
|
+
return "'extend " + c.extend + "' in " + c.parent.fullName;
|
|
2327
2335
|
}).join(", "));
|
|
2328
2336
|
return i.prototype.resolveAll.call(this);
|
|
2329
2337
|
};
|
|
2330
2338
|
var l = /^[A-Z]/;
|
|
2331
|
-
function d(
|
|
2332
|
-
var p =
|
|
2339
|
+
function d(h, c) {
|
|
2340
|
+
var p = c.parent.lookup(c.extend);
|
|
2333
2341
|
if (p) {
|
|
2334
|
-
var m = new e(
|
|
2335
|
-
return p.get(m.name) || (m.declaringField =
|
|
2342
|
+
var m = new e(c.fullName, c.id, c.type, c.rule, void 0, c.options);
|
|
2343
|
+
return p.get(m.name) || (m.declaringField = c, c.extensionField = m, p.add(m)), !0;
|
|
2336
2344
|
}
|
|
2337
2345
|
return !1;
|
|
2338
2346
|
}
|
|
2339
|
-
return o.prototype._handleAdd = function(
|
|
2340
|
-
if (
|
|
2347
|
+
return o.prototype._handleAdd = function(c) {
|
|
2348
|
+
if (c instanceof e)
|
|
2341
2349
|
/* an extension field (implies not part of a oneof) */
|
|
2342
|
-
|
|
2343
|
-
!
|
|
2344
|
-
else if (
|
|
2345
|
-
l.test(
|
|
2346
|
-
else if (!(
|
|
2347
|
-
if (
|
|
2350
|
+
c.extend !== void 0 && /* not already handled */
|
|
2351
|
+
!c.extensionField && (d(this, c) || this.deferred.push(c));
|
|
2352
|
+
else if (c instanceof n)
|
|
2353
|
+
l.test(c.name) && (c.parent[c.name] = c.values);
|
|
2354
|
+
else if (!(c instanceof f)) {
|
|
2355
|
+
if (c instanceof a)
|
|
2348
2356
|
for (var p = 0; p < this.deferred.length; )
|
|
2349
2357
|
d(this, this.deferred[p]) ? this.deferred.splice(p, 1) : ++p;
|
|
2350
2358
|
for (var m = 0; m < /* initializes */
|
|
2351
|
-
|
|
2352
|
-
this._handleAdd(
|
|
2353
|
-
l.test(
|
|
2359
|
+
c.nestedArray.length; ++m)
|
|
2360
|
+
this._handleAdd(c._nestedArray[m]);
|
|
2361
|
+
l.test(c.name) && (c.parent[c.name] = c);
|
|
2354
2362
|
}
|
|
2355
|
-
}, o.prototype._handleRemove = function(
|
|
2356
|
-
if (
|
|
2363
|
+
}, o.prototype._handleRemove = function(c) {
|
|
2364
|
+
if (c instanceof e) {
|
|
2357
2365
|
if (
|
|
2358
2366
|
/* an extension field */
|
|
2359
|
-
|
|
2367
|
+
c.extend !== void 0
|
|
2360
2368
|
)
|
|
2361
2369
|
if (
|
|
2362
2370
|
/* already handled */
|
|
2363
|
-
|
|
2371
|
+
c.extensionField
|
|
2364
2372
|
)
|
|
2365
|
-
|
|
2373
|
+
c.extensionField.parent.remove(c.extensionField), c.extensionField = null;
|
|
2366
2374
|
else {
|
|
2367
|
-
var p = this.deferred.indexOf(
|
|
2375
|
+
var p = this.deferred.indexOf(c);
|
|
2368
2376
|
p > -1 && this.deferred.splice(p, 1);
|
|
2369
2377
|
}
|
|
2370
|
-
} else if (
|
|
2371
|
-
l.test(
|
|
2372
|
-
else if (
|
|
2378
|
+
} else if (c instanceof n)
|
|
2379
|
+
l.test(c.name) && delete c.parent[c.name];
|
|
2380
|
+
else if (c instanceof i) {
|
|
2373
2381
|
for (var m = 0; m < /* initializes */
|
|
2374
|
-
|
|
2375
|
-
this._handleRemove(
|
|
2376
|
-
l.test(
|
|
2382
|
+
c.nestedArray.length; ++m)
|
|
2383
|
+
this._handleRemove(c._nestedArray[m]);
|
|
2384
|
+
l.test(c.name) && delete c.parent[c.name];
|
|
2377
2385
|
}
|
|
2378
|
-
}, o._configure = function(
|
|
2379
|
-
|
|
2386
|
+
}, o._configure = function(h, c, p) {
|
|
2387
|
+
a = h, t = c, s = p;
|
|
2380
2388
|
}, root;
|
|
2381
2389
|
}
|
|
2382
2390
|
var hasRequiredUtil;
|
|
2383
2391
|
function requireUtil() {
|
|
2384
2392
|
if (hasRequiredUtil) return util$1.exports;
|
|
2385
2393
|
hasRequiredUtil = 1;
|
|
2386
|
-
var i = util$1.exports = requireMinimal(), e = roots, n,
|
|
2394
|
+
var i = util$1.exports = requireMinimal(), e = roots, n, f;
|
|
2387
2395
|
i.codegen = codegen_1, i.fetch = fetch_1, i.path = path, i.fs = i.inquire("fs"), i.toArray = function(r) {
|
|
2388
2396
|
if (r) {
|
|
2389
|
-
for (var l = Object.keys(r), d = new Array(l.length),
|
|
2390
|
-
d[
|
|
2397
|
+
for (var l = Object.keys(r), d = new Array(l.length), h = 0; h < l.length; )
|
|
2398
|
+
d[h] = r[l[h++]];
|
|
2391
2399
|
return d;
|
|
2392
2400
|
}
|
|
2393
2401
|
return [];
|
|
2394
2402
|
}, i.toObject = function(r) {
|
|
2395
2403
|
for (var l = {}, d = 0; d < r.length; ) {
|
|
2396
|
-
var
|
|
2397
|
-
|
|
2404
|
+
var h = r[d++], c = r[d++];
|
|
2405
|
+
c !== void 0 && (l[h] = c);
|
|
2398
2406
|
}
|
|
2399
2407
|
return l;
|
|
2400
2408
|
};
|
|
2401
|
-
var
|
|
2409
|
+
var u = /\\/g, a = /"/g;
|
|
2402
2410
|
i.isReserved = function(r) {
|
|
2403
2411
|
return /^(?: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)$/.test(r);
|
|
2404
2412
|
}, i.safeProp = function(r) {
|
|
2405
|
-
return !/^[$\w_]+$/.test(r) || i.isReserved(r) ? '["' + r.replace(
|
|
2413
|
+
return !/^[$\w_]+$/.test(r) || i.isReserved(r) ? '["' + r.replace(u, "\\\\").replace(a, '\\"') + '"]' : "." + r;
|
|
2406
2414
|
}, i.ucFirst = function(r) {
|
|
2407
2415
|
return r.charAt(0).toUpperCase() + r.substring(1);
|
|
2408
2416
|
};
|
|
@@ -2424,27 +2432,27 @@ function requireUtil() {
|
|
|
2424
2432
|
return i.decorateEnum = function(r) {
|
|
2425
2433
|
if (r.$type)
|
|
2426
2434
|
return r.$type;
|
|
2427
|
-
|
|
2428
|
-
var l = new
|
|
2435
|
+
f || (f = require_enum());
|
|
2436
|
+
var l = new f("Enum" + s++, r);
|
|
2429
2437
|
return i.decorateRoot.add(l), Object.defineProperty(r, "$type", { value: l, enumerable: !1 }), l;
|
|
2430
2438
|
}, i.setProperty = function(r, l, d) {
|
|
2431
|
-
function c
|
|
2439
|
+
function h(c, p, m) {
|
|
2432
2440
|
var _ = p.shift();
|
|
2433
2441
|
if (_ === "__proto__" || _ === "prototype")
|
|
2434
|
-
return
|
|
2442
|
+
return c;
|
|
2435
2443
|
if (p.length > 0)
|
|
2436
|
-
|
|
2444
|
+
c[_] = h(c[_] || {}, p, m);
|
|
2437
2445
|
else {
|
|
2438
|
-
var v =
|
|
2439
|
-
v && (m = [].concat(v).concat(m)),
|
|
2446
|
+
var v = c[_];
|
|
2447
|
+
v && (m = [].concat(v).concat(m)), c[_] = m;
|
|
2440
2448
|
}
|
|
2441
|
-
return
|
|
2449
|
+
return c;
|
|
2442
2450
|
}
|
|
2443
2451
|
if (typeof r != "object")
|
|
2444
2452
|
throw TypeError("dst must be an object");
|
|
2445
2453
|
if (!l)
|
|
2446
2454
|
throw TypeError("path must be specified");
|
|
2447
|
-
return l = l.split("."),
|
|
2455
|
+
return l = l.split("."), h(r, l, d);
|
|
2448
2456
|
}, Object.defineProperty(i, "decorateRoot", {
|
|
2449
2457
|
get: function() {
|
|
2450
2458
|
return e.decorated || (e.decorated = new (requireRoot())());
|
|
@@ -2456,12 +2464,12 @@ function requireObject() {
|
|
|
2456
2464
|
if (hasRequiredObject) return object;
|
|
2457
2465
|
hasRequiredObject = 1, object = n, n.className = "ReflectionObject";
|
|
2458
2466
|
var i = requireUtil(), e;
|
|
2459
|
-
function n(
|
|
2460
|
-
if (!i.isString(
|
|
2467
|
+
function n(f, u) {
|
|
2468
|
+
if (!i.isString(f))
|
|
2461
2469
|
throw TypeError("name must be a string");
|
|
2462
|
-
if (
|
|
2470
|
+
if (u && !i.isObject(u))
|
|
2463
2471
|
throw TypeError("options must be an object");
|
|
2464
|
-
this.options =
|
|
2472
|
+
this.options = u, this.parsedOptions = null, this.name = f, this.parent = null, this.resolved = !1, this.comment = null, this.filename = null;
|
|
2465
2473
|
}
|
|
2466
2474
|
return Object.defineProperties(n.prototype, {
|
|
2467
2475
|
/**
|
|
@@ -2472,9 +2480,9 @@ function requireObject() {
|
|
|
2472
2480
|
*/
|
|
2473
2481
|
root: {
|
|
2474
2482
|
get: function() {
|
|
2475
|
-
for (var
|
|
2476
|
-
|
|
2477
|
-
return
|
|
2483
|
+
for (var f = this; f.parent !== null; )
|
|
2484
|
+
f = f.parent;
|
|
2485
|
+
return f;
|
|
2478
2486
|
}
|
|
2479
2487
|
},
|
|
2480
2488
|
/**
|
|
@@ -2485,76 +2493,76 @@ function requireObject() {
|
|
|
2485
2493
|
*/
|
|
2486
2494
|
fullName: {
|
|
2487
2495
|
get: function() {
|
|
2488
|
-
for (var
|
|
2489
|
-
|
|
2490
|
-
return
|
|
2496
|
+
for (var f = [this.name], u = this.parent; u; )
|
|
2497
|
+
f.unshift(u.name), u = u.parent;
|
|
2498
|
+
return f.join(".");
|
|
2491
2499
|
}
|
|
2492
2500
|
}
|
|
2493
2501
|
}), n.prototype.toJSON = /* istanbul ignore next */
|
|
2494
2502
|
function() {
|
|
2495
2503
|
throw Error();
|
|
2496
|
-
}, n.prototype.onAdd = function(
|
|
2497
|
-
this.parent && this.parent !==
|
|
2498
|
-
var
|
|
2499
|
-
|
|
2500
|
-
}, n.prototype.onRemove = function(
|
|
2501
|
-
var
|
|
2502
|
-
|
|
2504
|
+
}, n.prototype.onAdd = function(u) {
|
|
2505
|
+
this.parent && this.parent !== u && this.parent.remove(this), this.parent = u, this.resolved = !1;
|
|
2506
|
+
var a = u.root;
|
|
2507
|
+
a instanceof e && a._handleAdd(this);
|
|
2508
|
+
}, n.prototype.onRemove = function(u) {
|
|
2509
|
+
var a = u.root;
|
|
2510
|
+
a instanceof e && a._handleRemove(this), this.parent = null, this.resolved = !1;
|
|
2503
2511
|
}, n.prototype.resolve = function() {
|
|
2504
2512
|
return this.resolved ? this : (this.root instanceof e && (this.resolved = !0), this);
|
|
2505
|
-
}, n.prototype.getOption = function(
|
|
2513
|
+
}, n.prototype.getOption = function(u) {
|
|
2506
2514
|
if (this.options)
|
|
2507
|
-
return this.options[
|
|
2508
|
-
}, n.prototype.setOption = function(
|
|
2509
|
-
return (!t || !this.options || this.options[
|
|
2510
|
-
}, n.prototype.setParsedOption = function(
|
|
2515
|
+
return this.options[u];
|
|
2516
|
+
}, n.prototype.setOption = function(u, a, t) {
|
|
2517
|
+
return (!t || !this.options || this.options[u] === void 0) && ((this.options || (this.options = {}))[u] = a), this;
|
|
2518
|
+
}, n.prototype.setParsedOption = function(u, a, t) {
|
|
2511
2519
|
this.parsedOptions || (this.parsedOptions = []);
|
|
2512
2520
|
var s = this.parsedOptions;
|
|
2513
2521
|
if (t) {
|
|
2514
2522
|
var o = s.find(function(d) {
|
|
2515
|
-
return Object.prototype.hasOwnProperty.call(d,
|
|
2523
|
+
return Object.prototype.hasOwnProperty.call(d, u);
|
|
2516
2524
|
});
|
|
2517
2525
|
if (o) {
|
|
2518
|
-
var r = o[
|
|
2519
|
-
i.setProperty(r, t,
|
|
2526
|
+
var r = o[u];
|
|
2527
|
+
i.setProperty(r, t, a);
|
|
2520
2528
|
} else
|
|
2521
|
-
o = {}, o[
|
|
2529
|
+
o = {}, o[u] = i.setProperty({}, t, a), s.push(o);
|
|
2522
2530
|
} else {
|
|
2523
2531
|
var l = {};
|
|
2524
|
-
l[
|
|
2532
|
+
l[u] = a, s.push(l);
|
|
2525
2533
|
}
|
|
2526
2534
|
return this;
|
|
2527
|
-
}, n.prototype.setOptions = function(
|
|
2528
|
-
if (
|
|
2529
|
-
for (var t = Object.keys(
|
|
2530
|
-
this.setOption(t[s],
|
|
2535
|
+
}, n.prototype.setOptions = function(u, a) {
|
|
2536
|
+
if (u)
|
|
2537
|
+
for (var t = Object.keys(u), s = 0; s < t.length; ++s)
|
|
2538
|
+
this.setOption(t[s], u[t[s]], a);
|
|
2531
2539
|
return this;
|
|
2532
2540
|
}, n.prototype.toString = function() {
|
|
2533
|
-
var
|
|
2534
|
-
return
|
|
2535
|
-
}, n._configure = function(
|
|
2536
|
-
e =
|
|
2541
|
+
var u = this.constructor.className, a = this.fullName;
|
|
2542
|
+
return a.length ? u + " " + a : u;
|
|
2543
|
+
}, n._configure = function(f) {
|
|
2544
|
+
e = f;
|
|
2537
2545
|
}, object;
|
|
2538
2546
|
}
|
|
2539
2547
|
var _enum, hasRequired_enum;
|
|
2540
2548
|
function require_enum() {
|
|
2541
2549
|
if (hasRequired_enum) return _enum;
|
|
2542
|
-
hasRequired_enum = 1, _enum =
|
|
2550
|
+
hasRequired_enum = 1, _enum = f;
|
|
2543
2551
|
var i = requireObject();
|
|
2544
|
-
((
|
|
2552
|
+
((f.prototype = Object.create(i.prototype)).constructor = f).className = "Enum";
|
|
2545
2553
|
var e = requireNamespace(), n = requireUtil();
|
|
2546
|
-
function
|
|
2547
|
-
if (i.call(this,
|
|
2554
|
+
function f(u, a, t, s, o, r) {
|
|
2555
|
+
if (i.call(this, u, t), a && typeof a != "object")
|
|
2548
2556
|
throw TypeError("values must be an object");
|
|
2549
|
-
if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = s, this.comments = o || {}, this.valuesOptions = r, this.reserved = void 0,
|
|
2550
|
-
for (var l = Object.keys(
|
|
2551
|
-
typeof
|
|
2557
|
+
if (this.valuesById = {}, this.values = Object.create(this.valuesById), this.comment = s, this.comments = o || {}, this.valuesOptions = r, this.reserved = void 0, a)
|
|
2558
|
+
for (var l = Object.keys(a), d = 0; d < l.length; ++d)
|
|
2559
|
+
typeof a[l[d]] == "number" && (this.valuesById[this.values[l[d]] = a[l[d]]] = l[d]);
|
|
2552
2560
|
}
|
|
2553
|
-
return
|
|
2554
|
-
var s = new a
|
|
2561
|
+
return f.fromJSON = function(a, t) {
|
|
2562
|
+
var s = new f(a, t.values, t.options, t.comment, t.comments);
|
|
2555
2563
|
return s.reserved = t.reserved, s;
|
|
2556
|
-
},
|
|
2557
|
-
var t =
|
|
2564
|
+
}, f.prototype.toJSON = function(a) {
|
|
2565
|
+
var t = a ? !!a.keepComments : !1;
|
|
2558
2566
|
return n.toObject([
|
|
2559
2567
|
"options",
|
|
2560
2568
|
this.options,
|
|
@@ -2569,52 +2577,52 @@ function require_enum() {
|
|
|
2569
2577
|
"comments",
|
|
2570
2578
|
t ? this.comments : void 0
|
|
2571
2579
|
]);
|
|
2572
|
-
},
|
|
2573
|
-
if (!n.isString(
|
|
2580
|
+
}, f.prototype.add = function(a, t, s, o) {
|
|
2581
|
+
if (!n.isString(a))
|
|
2574
2582
|
throw TypeError("name must be a string");
|
|
2575
2583
|
if (!n.isInteger(t))
|
|
2576
2584
|
throw TypeError("id must be an integer");
|
|
2577
|
-
if (this.values[
|
|
2578
|
-
throw Error("duplicate name '" +
|
|
2585
|
+
if (this.values[a] !== void 0)
|
|
2586
|
+
throw Error("duplicate name '" + a + "' in " + this);
|
|
2579
2587
|
if (this.isReservedId(t))
|
|
2580
2588
|
throw Error("id " + t + " is reserved in " + this);
|
|
2581
|
-
if (this.isReservedName(
|
|
2582
|
-
throw Error("name '" +
|
|
2589
|
+
if (this.isReservedName(a))
|
|
2590
|
+
throw Error("name '" + a + "' is reserved in " + this);
|
|
2583
2591
|
if (this.valuesById[t] !== void 0) {
|
|
2584
2592
|
if (!(this.options && this.options.allow_alias))
|
|
2585
2593
|
throw Error("duplicate id " + t + " in " + this);
|
|
2586
|
-
this.values[
|
|
2594
|
+
this.values[a] = t;
|
|
2587
2595
|
} else
|
|
2588
|
-
this.valuesById[this.values[
|
|
2589
|
-
return o && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[
|
|
2590
|
-
},
|
|
2591
|
-
if (!n.isString(
|
|
2596
|
+
this.valuesById[this.values[a] = t] = a;
|
|
2597
|
+
return o && (this.valuesOptions === void 0 && (this.valuesOptions = {}), this.valuesOptions[a] = o || null), this.comments[a] = s || null, this;
|
|
2598
|
+
}, f.prototype.remove = function(a) {
|
|
2599
|
+
if (!n.isString(a))
|
|
2592
2600
|
throw TypeError("name must be a string");
|
|
2593
|
-
var t = this.values[
|
|
2601
|
+
var t = this.values[a];
|
|
2594
2602
|
if (t == null)
|
|
2595
|
-
throw Error("name '" +
|
|
2596
|
-
return delete this.valuesById[t], delete this.values[
|
|
2597
|
-
},
|
|
2598
|
-
return e.isReservedId(this.reserved,
|
|
2599
|
-
},
|
|
2600
|
-
return e.isReservedName(this.reserved,
|
|
2603
|
+
throw Error("name '" + a + "' does not exist in " + this);
|
|
2604
|
+
return delete this.valuesById[t], delete this.values[a], delete this.comments[a], this.valuesOptions && delete this.valuesOptions[a], this;
|
|
2605
|
+
}, f.prototype.isReservedId = function(a) {
|
|
2606
|
+
return e.isReservedId(this.reserved, a);
|
|
2607
|
+
}, f.prototype.isReservedName = function(a) {
|
|
2608
|
+
return e.isReservedName(this.reserved, a);
|
|
2601
2609
|
}, _enum;
|
|
2602
2610
|
}
|
|
2603
2611
|
var encoder_1, hasRequiredEncoder;
|
|
2604
2612
|
function requireEncoder() {
|
|
2605
2613
|
if (hasRequiredEncoder) return encoder_1;
|
|
2606
|
-
hasRequiredEncoder = 1, encoder_1 =
|
|
2614
|
+
hasRequiredEncoder = 1, encoder_1 = u;
|
|
2607
2615
|
var i = require_enum(), e = requireTypes(), n = requireUtil();
|
|
2608
|
-
function a
|
|
2609
|
-
return t.resolvedType.group ?
|
|
2616
|
+
function f(a, t, s, o) {
|
|
2617
|
+
return t.resolvedType.group ? a("types[%i].encode(%s,w.uint32(%i)).uint32(%i)", s, o, (t.id << 3 | 3) >>> 0, (t.id << 3 | 4) >>> 0) : a("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()", s, o, (t.id << 3 | 2) >>> 0);
|
|
2610
2618
|
}
|
|
2611
|
-
function
|
|
2612
|
-
for (var t = n.codegen(["m", "w"],
|
|
2619
|
+
function u(a) {
|
|
2620
|
+
for (var t = n.codegen(["m", "w"], a.name + "$encode")("if(!w)")("w=Writer.create()"), s, o, r = (
|
|
2613
2621
|
/* initializes */
|
|
2614
|
-
|
|
2622
|
+
a.fieldsArray.slice().sort(n.compareFieldsById)
|
|
2615
2623
|
), s = 0; s < r.length; ++s) {
|
|
2616
|
-
var l = r[s].resolve(), d =
|
|
2617
|
-
o = "m" + n.safeProp(l.name), l.map ? (t("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", o, l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", o)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (l.id << 3 | 2) >>> 0, 8 | e.mapKey[l.keyType], l.keyType),
|
|
2624
|
+
var l = r[s].resolve(), d = a._fieldsArray.indexOf(l), h = l.resolvedType instanceof i ? "int32" : l.type, c = e.basic[h];
|
|
2625
|
+
o = "m" + n.safeProp(l.name), l.map ? (t("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){", o, l.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){", o)("w.uint32(%i).fork().uint32(%i).%s(ks[i])", (l.id << 3 | 2) >>> 0, 8 | e.mapKey[l.keyType], l.keyType), c === void 0 ? t("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()", d, o) : t(".uint32(%i).%s(%s[ks[i]]).ldelim()", 16 | c, h, o), t("}")("}")) : l.repeated ? (t("if(%s!=null&&%s.length){", o, o), l.packed && e.packed[h] !== void 0 ? t("w.uint32(%i).fork()", (l.id << 3 | 2) >>> 0)("for(var i=0;i<%s.length;++i)", o)("w.%s(%s[i])", h, o)("w.ldelim()") : (t("for(var i=0;i<%s.length;++i)", o), c === void 0 ? f(t, l, d, o + "[i]") : t("w.uint32(%i).%s(%s[i])", (l.id << 3 | c) >>> 0, h, o)), t("}")) : (l.optional && t("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", o, l.name), c === void 0 ? f(t, l, d, o) : t("w.uint32(%i).%s(%s)", (l.id << 3 | c) >>> 0, h, o));
|
|
2618
2626
|
}
|
|
2619
2627
|
return t("return w");
|
|
2620
2628
|
}
|
|
@@ -2656,41 +2664,36 @@ var indexLightExports = indexLight.exports, light = indexLightExports;
|
|
|
2656
2664
|
const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data = { options: { syntax: "proto3", optimize_for: "LITE_RUNTIME" }, nested: { nil: { nested: { xit: { nested: { proto: { nested: { MessageType: { values: { MessageType_FrameRequest: 0, MessageType_FrameResponse: 1, MessageType_FrameCache: 2, MessageType_FrameLoaded: 3, MessageType_FrameSubscribe: 4, MessageType_FrameUnsubscribe: 5, MessageType_ValueRequest: 6, MessageType_ValueResponse: 7, MessageType_ValueUpdate: 8, MessageType_SignalRequest: 9, MessageType_SignalResponse: 10, MessageType_SignalNotify: 11, MessageType_FileRequest: 12, MessageType_FileResponse: 13 } }, FrameRequest: { fields: { id: { type: "string", id: 1 } } }, FrameResponse: { oneofs: { value: { oneof: ["file", "content"] } }, fields: { id: { type: "string", id: 1 }, file: { type: "string", id: 2 }, content: { type: "string", id: 3 } } }, FrameCache: { fields: { id: { type: "string", id: 1 }, content: { type: "string", id: 2 }, files: { rule: "repeated", type: "FileInfo", id: 3 } } }, FrameLoaded: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, FrameSubscribe: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, FrameUnsubscribe: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, Value: { oneofs: { value: { oneof: ["value_boolean", "value_number", "value_double", "value_string", "value_buffer"] } }, fields: { id: { type: "string", id: 1 }, value_boolean: { type: "bool", id: 2 }, value_number: { type: "int64", id: 3 }, value_double: { type: "double", id: 4 }, value_string: { type: "string", id: 5 }, value_buffer: { type: "bytes", id: 6 } } }, ValueRequest: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, ValueResponse: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, values: { rule: "repeated", type: "Value", id: 3 } } }, ValueUpdate: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, value: { type: "Value", id: 3 } } }, SignalRequest: { fields: { id: { type: "string", id: 1 } } }, Signal: { oneofs: { _type: { oneof: ["type"] } }, fields: { id: { type: "string", id: 1 }, type: { type: "string", id: 2, options: { proto3_optional: !0 } } } }, SignalResponse: { oneofs: { _tag: { oneof: ["tag"] } }, fields: { id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, signals: { rule: "repeated", type: "Signal", id: 3 } } }, SignalNotify: { oneofs: { _tag: { oneof: ["tag"] }, arg: { oneof: ["arg_boolean", "arg_number", "arg_double", "arg_string", "arg_buffer"] } }, fields: { frame_id: { type: "string", id: 1 }, tag: { type: "string", id: 2, options: { proto3_optional: !0 } }, signal_id: { type: "string", id: 3 }, arg_boolean: { type: "bool", id: 4 }, arg_number: { type: "int64", id: 5 }, arg_double: { type: "double", id: 6 }, arg_string: { type: "string", id: 7 }, arg_buffer: { type: "bytes", id: 8 } } }, FileRequest: { fields: { target: { type: "string", id: 1 } } }, FileResponse: { fields: { target: { type: "string", id: 1 }, content: { type: "string", id: 2 }, metadata: { type: "bytes", id: 3 } } }, FileInfo: { fields: { target: { type: "string", id: 1 }, metadata: { type: "bytes", id: 2 } } } } } } } } } } }, nil_xit_proto = protobufjs.Root.fromJSON(proto_data).lookup(
|
|
2657
2665
|
"nil.xit.proto"
|
|
2658
2666
|
), bundle = async (i) => new Promise((e, n) => {
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
), { type: "module" });
|
|
2665
|
-
a.postMessage({ type: "init", host: i.host, id: i.id, cdn_url: i.cdn_url }), a.addEventListener("message", async (f) => {
|
|
2666
|
-
if (f.data.ok) {
|
|
2667
|
-
if (f.data.files) {
|
|
2668
|
-
const u = concat([
|
|
2667
|
+
const f = new WorkerWrapper();
|
|
2668
|
+
f.postMessage({ type: "init", host: i.host, id: i.id, cdn_url: i.cdn_url }), f.addEventListener("message", async (u) => {
|
|
2669
|
+
if (u.data.ok) {
|
|
2670
|
+
if (u.data.files) {
|
|
2671
|
+
const a = concat([
|
|
2669
2672
|
header(nil_xit_proto.MessageType.MessageType_FrameCache),
|
|
2670
2673
|
nil_xit_proto.FrameCache.encode({
|
|
2671
2674
|
id: i.id,
|
|
2672
|
-
content:
|
|
2673
|
-
files:
|
|
2675
|
+
content: u.data.code,
|
|
2676
|
+
files: u.data.files
|
|
2674
2677
|
}).finish()
|
|
2675
2678
|
]);
|
|
2676
|
-
service_publish({ host: i.host },
|
|
2679
|
+
service_publish({ host: i.host }, a);
|
|
2677
2680
|
}
|
|
2678
2681
|
e(await import(
|
|
2679
2682
|
/* @vite-ignore */
|
|
2680
|
-
|
|
2683
|
+
u.data.code
|
|
2681
2684
|
));
|
|
2682
2685
|
} else
|
|
2683
|
-
n(
|
|
2684
|
-
|
|
2686
|
+
n(u.data.err);
|
|
2687
|
+
f.terminate();
|
|
2685
2688
|
});
|
|
2686
2689
|
}), noop = (i) => {
|
|
2687
2690
|
}, make_values = async ({
|
|
2688
2691
|
id: i,
|
|
2689
2692
|
tag: e,
|
|
2690
2693
|
host: n,
|
|
2691
|
-
service:
|
|
2694
|
+
service: f
|
|
2692
2695
|
}) => {
|
|
2693
|
-
const
|
|
2696
|
+
const u = await service_fetch(
|
|
2694
2697
|
{ host: n },
|
|
2695
2698
|
concat([
|
|
2696
2699
|
header(nil_xit_proto.MessageType.MessageType_ValueRequest),
|
|
@@ -2703,7 +2706,7 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2703
2706
|
return r.values;
|
|
2704
2707
|
}
|
|
2705
2708
|
}
|
|
2706
|
-
),
|
|
2709
|
+
), a = {
|
|
2707
2710
|
value_boolean: /* @__PURE__ */ new Map(),
|
|
2708
2711
|
value_double: /* @__PURE__ */ new Map(),
|
|
2709
2712
|
value_number: /* @__PURE__ */ new Map(),
|
|
@@ -2711,30 +2714,30 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2711
2714
|
value_buffer: /* @__PURE__ */ new Map()
|
|
2712
2715
|
};
|
|
2713
2716
|
let t = !1;
|
|
2714
|
-
for (const s of
|
|
2717
|
+
for (const s of u) {
|
|
2715
2718
|
const o = s.id, r = s.value, l = writable(s[r]);
|
|
2716
2719
|
l.subscribe((d) => {
|
|
2717
2720
|
if (t)
|
|
2718
2721
|
return;
|
|
2719
|
-
const
|
|
2720
|
-
|
|
2722
|
+
const h = { id: o, [r]: d, value: r }, c = { id: i, tag: e, value: h };
|
|
2723
|
+
f.publish(
|
|
2721
2724
|
concat([
|
|
2722
2725
|
header(nil_xit_proto.MessageType.MessageType_ValueUpdate),
|
|
2723
|
-
nil_xit_proto.ValueUpdate.encode(
|
|
2726
|
+
nil_xit_proto.ValueUpdate.encode(c).finish()
|
|
2724
2727
|
])
|
|
2725
2728
|
);
|
|
2726
|
-
}),
|
|
2729
|
+
}), a[r].set(o, l);
|
|
2727
2730
|
}
|
|
2728
|
-
return
|
|
2731
|
+
return f.on_message((s, o) => {
|
|
2729
2732
|
var d;
|
|
2730
2733
|
const r = new DataView(o.buffer).getUint32(0, !1), l = o.slice(4);
|
|
2731
2734
|
if (r === nil_xit_proto.MessageType.MessageType_ValueUpdate) {
|
|
2732
|
-
const
|
|
2733
|
-
if (
|
|
2735
|
+
const h = nil_xit_proto.ValueUpdate.decode(l);
|
|
2736
|
+
if (h.id === i && (h.tag === null || e === h.tag)) {
|
|
2734
2737
|
t = !0;
|
|
2735
|
-
const
|
|
2736
|
-
if (
|
|
2737
|
-
const m =
|
|
2738
|
+
const c = h.value.value, p = (d = a[c]) == null ? void 0 : d.get(h.value.id);
|
|
2739
|
+
if (c === "value_buffer") {
|
|
2740
|
+
const m = h.value[c], _ = get(p);
|
|
2738
2741
|
let v = !0;
|
|
2739
2742
|
if (m.length != _.length)
|
|
2740
2743
|
v = !1;
|
|
@@ -2748,18 +2751,18 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2748
2751
|
}
|
|
2749
2752
|
v || p == null || p.set(m);
|
|
2750
2753
|
} else
|
|
2751
|
-
p == null || p.set(
|
|
2754
|
+
p == null || p.set(h.value[c]);
|
|
2752
2755
|
t = !1;
|
|
2753
2756
|
}
|
|
2754
2757
|
}
|
|
2755
|
-
}),
|
|
2758
|
+
}), a;
|
|
2756
2759
|
}, make_signals = async ({
|
|
2757
2760
|
id: i,
|
|
2758
2761
|
tag: e,
|
|
2759
2762
|
host: n,
|
|
2760
|
-
service:
|
|
2763
|
+
service: f
|
|
2761
2764
|
}) => {
|
|
2762
|
-
const
|
|
2765
|
+
const u = await service_fetch(
|
|
2763
2766
|
{ host: n },
|
|
2764
2767
|
concat([
|
|
2765
2768
|
header(nil_xit_proto.MessageType.MessageType_SignalRequest),
|
|
@@ -2772,7 +2775,7 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2772
2775
|
return o.signals;
|
|
2773
2776
|
}
|
|
2774
2777
|
}
|
|
2775
|
-
),
|
|
2778
|
+
), a = {
|
|
2776
2779
|
arg_none: /* @__PURE__ */ new Map(),
|
|
2777
2780
|
arg_boolean: /* @__PURE__ */ new Map(),
|
|
2778
2781
|
arg_double: /* @__PURE__ */ new Map(),
|
|
@@ -2780,74 +2783,70 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2780
2783
|
arg_string: /* @__PURE__ */ new Map(),
|
|
2781
2784
|
arg_buffer: /* @__PURE__ */ new Map()
|
|
2782
2785
|
};
|
|
2783
|
-
for (const { id: t, type: s } of
|
|
2784
|
-
s == null ?
|
|
2786
|
+
for (const { id: t, type: s } of u)
|
|
2787
|
+
s == null ? a.arg_none.set(t, () => {
|
|
2785
2788
|
const o = { frame_id: i, signal_id: t, tag: e };
|
|
2786
|
-
|
|
2789
|
+
f.publish(
|
|
2787
2790
|
concat([
|
|
2788
2791
|
header(nil_xit_proto.MessageType.MessageType_SignalNotify),
|
|
2789
2792
|
nil_xit_proto.SignalNotify.encode(o).finish()
|
|
2790
2793
|
])
|
|
2791
2794
|
);
|
|
2792
|
-
}) :
|
|
2795
|
+
}) : a[s].set(t, (o) => {
|
|
2793
2796
|
const r = { frame_id: i, signal_id: t, tag: e, [s]: o };
|
|
2794
|
-
|
|
2797
|
+
f.publish(
|
|
2795
2798
|
concat([
|
|
2796
2799
|
header(nil_xit_proto.MessageType.MessageType_SignalNotify),
|
|
2797
2800
|
nil_xit_proto.SignalNotify.encode(r).finish()
|
|
2798
2801
|
])
|
|
2799
2802
|
);
|
|
2800
2803
|
});
|
|
2801
|
-
return
|
|
2802
|
-
},
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
update
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
}), create_app = async (i, e, n, a, f) => {
|
|
2843
|
-
const u = { host: i };
|
|
2844
|
-
await test_connection(u);
|
|
2845
|
-
const t = new Service$1(u), [s, o, { nil_xit_fn: r }] = await Promise.all([
|
|
2804
|
+
return a;
|
|
2805
|
+
}, create_context_values = (i) => ({
|
|
2806
|
+
boolean: (e, n) => i.value_boolean.get(e) ?? writable(n),
|
|
2807
|
+
double: (e, n) => i.value_double.get(e) ?? writable(n),
|
|
2808
|
+
string: (e, n) => i.value_string.get(e) ?? writable(n),
|
|
2809
|
+
number: (e, n) => i.value_number.get(e) ?? writable(n),
|
|
2810
|
+
buffer: (e, n) => i.value_buffer.get(e) ?? writable(n),
|
|
2811
|
+
json: (e, n, f) => {
|
|
2812
|
+
const u = i.value_buffer.get(e);
|
|
2813
|
+
if (u != null) {
|
|
2814
|
+
let a = get(u), t = f.decode(a);
|
|
2815
|
+
return {
|
|
2816
|
+
set: (s) => {
|
|
2817
|
+
t = s, a = f.encode(t), u.set(a);
|
|
2818
|
+
},
|
|
2819
|
+
subscribe: (s) => u.subscribe((o) => {
|
|
2820
|
+
o !== a && (a = o, t = f.decode(a)), s(t);
|
|
2821
|
+
}),
|
|
2822
|
+
update: (s) => {
|
|
2823
|
+
u.update((o) => (t = s(t), a = f.encode(t), a));
|
|
2824
|
+
}
|
|
2825
|
+
};
|
|
2826
|
+
}
|
|
2827
|
+
return writable(n);
|
|
2828
|
+
}
|
|
2829
|
+
}), create_context_signals = (i) => ({
|
|
2830
|
+
none: (e) => i.arg_none.get(e) ?? (() => {
|
|
2831
|
+
}),
|
|
2832
|
+
boolean: (e) => i.arg_boolean.get(e) ?? noop,
|
|
2833
|
+
double: (e) => i.arg_double.get(e) ?? noop,
|
|
2834
|
+
number: (e) => i.arg_number.get(e) ?? noop,
|
|
2835
|
+
string: (e) => i.arg_string.get(e) ?? noop,
|
|
2836
|
+
buffer: (e) => i.arg_buffer.get(e) ?? noop,
|
|
2837
|
+
json: (e, n) => {
|
|
2838
|
+
const f = i.arg_buffer.get(e);
|
|
2839
|
+
return f != null ? (u) => f(n(u)) : noop;
|
|
2840
|
+
}
|
|
2841
|
+
}), create_component$1 = async (i, e, n, f, u) => {
|
|
2842
|
+
const a = { host: i };
|
|
2843
|
+
await test_connection(a);
|
|
2844
|
+
const t = new Service$1(a), [s, o, { nil_xit_fn: r }] = await Promise.all([
|
|
2846
2845
|
make_values({ id: e, tag: n, host: i, service: t }),
|
|
2847
2846
|
make_signals({ id: e, tag: n, host: i, service: t }),
|
|
2848
|
-
bundle({ host: i, cdn_url:
|
|
2847
|
+
bundle({ host: i, cdn_url: f, id: e })
|
|
2849
2848
|
]), l = {
|
|
2850
|
-
svelte: () => import("./svelte/index.js").then((p) => p.
|
|
2849
|
+
svelte: () => import("./svelte/index.js").then((p) => p.bW),
|
|
2851
2850
|
"svelte/store": () => import("./svelte/store.js").then((p) => p.i),
|
|
2852
2851
|
"svelte/animate": () => import("./svelte/animate.js"),
|
|
2853
2852
|
"svelte/easing": () => import("./svelte/easing.js"),
|
|
@@ -2861,7 +2860,7 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2861
2860
|
}, d = (p) => p in l ? l[p]() : import(
|
|
2862
2861
|
/* @vite-ignore */
|
|
2863
2862
|
p
|
|
2864
|
-
), { action:
|
|
2863
|
+
), { action: h } = await r(d), c = concat([
|
|
2865
2864
|
header(nil_xit_proto.MessageType.MessageType_FrameLoaded),
|
|
2866
2865
|
nil_xit_proto.FrameLoaded.encode({ id: e, tag: n }).finish()
|
|
2867
2866
|
]);
|
|
@@ -2871,38 +2870,63 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2871
2870
|
nil_xit_proto.FrameLoaded.encode({ id: e, tag: n }).finish()
|
|
2872
2871
|
]);
|
|
2873
2872
|
t.publish(p);
|
|
2874
|
-
}), service_publish(
|
|
2873
|
+
}), service_publish(a, c), (p) => {
|
|
2875
2874
|
const m = /* @__PURE__ */ new Map();
|
|
2876
|
-
m.set("nil.xit",
|
|
2877
|
-
|
|
2875
|
+
m.set("nil.xit", {
|
|
2876
|
+
loader: u,
|
|
2877
|
+
values: create_context_values(s),
|
|
2878
|
+
signals: create_context_signals(o)
|
|
2879
|
+
});
|
|
2880
|
+
const { destroy: _ } = h(p, m);
|
|
2878
2881
|
return {
|
|
2879
2882
|
destroy: () => {
|
|
2880
2883
|
t.stop(), _();
|
|
2881
2884
|
}
|
|
2882
2885
|
};
|
|
2883
2886
|
};
|
|
2884
|
-
},
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
)
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2887
|
+
}, create_frame = async ({
|
|
2888
|
+
server: i,
|
|
2889
|
+
frame: e,
|
|
2890
|
+
tag: n
|
|
2891
|
+
}) => {
|
|
2892
|
+
const f = { host: i };
|
|
2893
|
+
await test_connection(f);
|
|
2894
|
+
const u = new Service$1(f), [a, t] = await Promise.all([
|
|
2895
|
+
make_values({ id: e, tag: n ?? null, host: i, service: u }),
|
|
2896
|
+
make_signals({ id: e, tag: n ?? null, host: i, service: u })
|
|
2897
|
+
]), s = concat([
|
|
2898
|
+
header(nil_xit_proto.MessageType.MessageType_FrameLoaded),
|
|
2899
|
+
nil_xit_proto.FrameLoaded.encode({ id: e, tag: n ?? null }).finish()
|
|
2900
|
+
]);
|
|
2901
|
+
return u.start(), u.on_connect(() => {
|
|
2902
|
+
const o = concat([
|
|
2903
|
+
header(nil_xit_proto.MessageType.MessageType_FrameSubscribe),
|
|
2904
|
+
nil_xit_proto.FrameLoaded.encode({ id: e, tag: n ?? null }).finish()
|
|
2905
|
+
]);
|
|
2906
|
+
u.publish(o);
|
|
2907
|
+
}), service_publish(f, s), { values: create_context_values(a), signals: create_context_signals(t) };
|
|
2908
|
+
}, create_frame_ui = async ({
|
|
2909
|
+
server: i,
|
|
2910
|
+
cdn_url: e,
|
|
2911
|
+
frame: n,
|
|
2912
|
+
tag: f
|
|
2913
|
+
}) => {
|
|
2914
|
+
const u = async (a, t) => {
|
|
2915
|
+
const s = await create_frame_ui({
|
|
2916
|
+
server: i,
|
|
2917
|
+
cdn_url: e,
|
|
2918
|
+
frame: a,
|
|
2919
|
+
tag: t
|
|
2920
|
+
});
|
|
2921
|
+
return (o) => s(o);
|
|
2900
2922
|
};
|
|
2901
|
-
return
|
|
2902
|
-
|
|
2903
|
-
|
|
2923
|
+
return create_component$1(i, n, f ?? null, e, {
|
|
2924
|
+
frame_ui: (a, t) => u(a, t),
|
|
2925
|
+
frame: (a, t) => create_frame({ server: i, frame: a, tag: t })
|
|
2904
2926
|
});
|
|
2905
|
-
}, create_component = async (i, e) => (await
|
|
2927
|
+
}, create_component = async (i, e) => (await create_frame_ui(e))(i);
|
|
2906
2928
|
export {
|
|
2907
|
-
create_component
|
|
2929
|
+
create_component,
|
|
2930
|
+
create_frame,
|
|
2931
|
+
create_frame_ui
|
|
2908
2932
|
};
|