@nil-/xit 0.1.12 → 0.1.14
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 +3 -3
- package/assets/index.js +326 -296
- package/package.json +1 -1
package/assets/index.js
CHANGED
|
@@ -2,58 +2,58 @@ 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), $ = (i, e, n, a) => (C(i, e, "write to private field"), a ? a.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, I,
|
|
7
|
+
var j, I, x, M, D, L, N, S, U;
|
|
8
8
|
let Service$1 = (U = class {
|
|
9
9
|
constructor({ host: e, port: n }) {
|
|
10
10
|
F(this, j);
|
|
11
|
-
F(this,
|
|
11
|
+
F(this, x);
|
|
12
12
|
// 0 idle, 1 has connected, 2 keep reconnecting, 3 stopped
|
|
13
13
|
F(this, M);
|
|
14
14
|
F(this, D);
|
|
15
15
|
F(this, L);
|
|
16
16
|
F(this, N);
|
|
17
|
-
F(this,
|
|
18
|
-
|
|
17
|
+
F(this, S);
|
|
18
|
+
$(this, N, `${e ?? "localhost"}${n != null ? `:${n}` : ""}`), $(this, x, 0), $(this, M, null), $(this, D, null), $(this, L, null), $(this, S, null);
|
|
19
19
|
}
|
|
20
20
|
on_message(e) {
|
|
21
|
-
|
|
21
|
+
$(this, L, e);
|
|
22
22
|
}
|
|
23
23
|
on_connect(e) {
|
|
24
|
-
|
|
24
|
+
$(this, M, e);
|
|
25
25
|
}
|
|
26
26
|
on_disconnect(e) {
|
|
27
|
-
|
|
27
|
+
$(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,
|
|
36
|
-
}, w(this,
|
|
37
|
-
w(this,
|
|
38
|
-
}, w(this,
|
|
32
|
+
w(this, S) == null && w(this, x) !== 1 && w(this, x) !== 3 && ($(this, S, new WebSocket(`ws://${w(this, N)}`)), w(this, S).binaryType = "arraybuffer", w(this, S).onopen = () => {
|
|
33
|
+
$(this, x, 1), w(this, M) && w(this, M).call(this, w(this, N));
|
|
34
|
+
}, w(this, S).onclose = () => {
|
|
35
|
+
w(this, x) === 1 && (w(this, D) && w(this, D).call(this, w(this, N)), $(this, x, 2), W(this, j, I).call(this));
|
|
36
|
+
}, w(this, S).onerror = () => {
|
|
37
|
+
w(this, x) !== 1 && w(this, x) !== 3 && ($(this, x, 2), W(this, j, I).call(this));
|
|
38
|
+
}, w(this, S).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
|
+
$(this, x, 3), w(this, S) != null && (w(this, S).close(), $(this, S, null));
|
|
44
44
|
}
|
|
45
45
|
restart() {
|
|
46
|
-
|
|
46
|
+
$(this, x, 0);
|
|
47
47
|
}
|
|
48
48
|
publish(e) {
|
|
49
|
-
w(this,
|
|
49
|
+
w(this, S) != null && w(this, x) == 1 && w(this, S).send(e);
|
|
50
50
|
}
|
|
51
51
|
send(e, n) {
|
|
52
52
|
e === w(this, N) && this.publish(n);
|
|
53
53
|
}
|
|
54
54
|
}, j = new WeakSet(), I = function() {
|
|
55
|
-
w(this,
|
|
56
|
-
},
|
|
55
|
+
w(this, S) != null && (w(this, S).close(), $(this, S, null)), setTimeout(() => this.start(), 1e3);
|
|
56
|
+
}, x = new WeakMap(), M = new WeakMap(), D = new WeakMap(), L = new WeakMap(), N = new WeakMap(), S = 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;
|
|
@@ -108,8 +108,8 @@ function asPromise$1(i, e) {
|
|
|
108
108
|
if (u = !1, l)
|
|
109
109
|
o(l);
|
|
110
110
|
else {
|
|
111
|
-
for (var d = new Array(arguments.length - 1),
|
|
112
|
-
d[
|
|
111
|
+
for (var d = new Array(arguments.length - 1), c = 0; c < d.length; )
|
|
112
|
+
d[c++] = arguments[c];
|
|
113
113
|
s.apply(null, d);
|
|
114
114
|
}
|
|
115
115
|
};
|
|
@@ -134,43 +134,43 @@ var base64$1 = {};
|
|
|
134
134
|
for (var n = new Array(64), a = new Array(123), f = 0; f < 64; )
|
|
135
135
|
a[n[f] = f < 26 ? f + 65 : f < 52 ? f + 71 : f < 62 ? f - 4 : f - 59 | 43] = f++;
|
|
136
136
|
e.encode = function(s, o, r) {
|
|
137
|
-
for (var l = null, d = [],
|
|
137
|
+
for (var l = null, d = [], c = 0, h = 0, p; o < r; ) {
|
|
138
138
|
var m = s[o++];
|
|
139
|
-
switch (
|
|
139
|
+
switch (h) {
|
|
140
140
|
case 0:
|
|
141
|
-
d[
|
|
141
|
+
d[c++] = n[m >> 2], p = (m & 3) << 4, h = 1;
|
|
142
142
|
break;
|
|
143
143
|
case 1:
|
|
144
|
-
d[
|
|
144
|
+
d[c++] = n[p | m >> 4], p = (m & 15) << 2, h = 2;
|
|
145
145
|
break;
|
|
146
146
|
case 2:
|
|
147
|
-
d[
|
|
147
|
+
d[c++] = n[p | m >> 6], d[c++] = n[m & 63], h = 0;
|
|
148
148
|
break;
|
|
149
149
|
}
|
|
150
|
-
|
|
150
|
+
c > 8191 && ((l || (l = [])).push(String.fromCharCode.apply(String, d)), c = 0);
|
|
151
151
|
}
|
|
152
|
-
return
|
|
152
|
+
return h && (d[c++] = n[p], d[c++] = 61, h === 1 && (d[c++] = 61)), l ? (c && l.push(String.fromCharCode.apply(String, d.slice(0, c))), l.join("")) : String.fromCharCode.apply(String, d.slice(0, c));
|
|
153
153
|
};
|
|
154
154
|
var u = "invalid encoding";
|
|
155
155
|
e.decode = function(s, o, r) {
|
|
156
|
-
for (var l = r, d = 0,
|
|
157
|
-
var p = s.charCodeAt(
|
|
156
|
+
for (var l = r, d = 0, c, h = 0; h < s.length; ) {
|
|
157
|
+
var p = s.charCodeAt(h++);
|
|
158
158
|
if (p === 61 && d > 1)
|
|
159
159
|
break;
|
|
160
160
|
if ((p = a[p]) === void 0)
|
|
161
161
|
throw Error(u);
|
|
162
162
|
switch (d) {
|
|
163
163
|
case 0:
|
|
164
|
-
|
|
164
|
+
c = p, d = 1;
|
|
165
165
|
break;
|
|
166
166
|
case 1:
|
|
167
|
-
o[r++] =
|
|
167
|
+
o[r++] = c << 2 | (p & 48) >> 4, c = p, d = 2;
|
|
168
168
|
break;
|
|
169
169
|
case 2:
|
|
170
|
-
o[r++] = (
|
|
170
|
+
o[r++] = (c & 15) << 4 | (p & 60) >> 2, c = p, d = 3;
|
|
171
171
|
break;
|
|
172
172
|
case 3:
|
|
173
|
-
o[r++] = (
|
|
173
|
+
o[r++] = (c & 3) << 6 | p, d = 0;
|
|
174
174
|
break;
|
|
175
175
|
}
|
|
176
176
|
}
|
|
@@ -300,8 +300,8 @@ function factory(i) {
|
|
|
300
300
|
}
|
|
301
301
|
i.writeDoubleLE = e.bind(null, writeUintLE, 0, 4), i.writeDoubleBE = e.bind(null, writeUintBE, 4, 0);
|
|
302
302
|
function n(a, f, u, t, s) {
|
|
303
|
-
var o = a(t, s + f), r = a(t, s + u), l = (r >> 31) * 2 + 1, d = r >>> 20 & 2047,
|
|
304
|
-
return d === 2047 ?
|
|
303
|
+
var o = a(t, s + f), r = a(t, s + u), l = (r >> 31) * 2 + 1, d = r >>> 20 & 2047, c = 4294967296 * (r & 1048575) + o;
|
|
304
|
+
return d === 2047 ? c ? NaN : l * (1 / 0) : d === 0 ? l * 5e-324 * c : l * Math.pow(2, d - 1075) * (c + 4503599627370496);
|
|
305
305
|
}
|
|
306
306
|
i.readDoubleLE = n.bind(null, readUintLE, 0, 4), i.readDoubleBE = n.bind(null, readUintBE, 4, 0);
|
|
307
307
|
}(), i;
|
|
@@ -986,23 +986,23 @@ function codegen(i, e) {
|
|
|
986
986
|
}
|
|
987
987
|
return Function(t)();
|
|
988
988
|
}
|
|
989
|
-
for (var d = new Array(arguments.length - 1),
|
|
990
|
-
d[
|
|
991
|
-
if (
|
|
992
|
-
var
|
|
989
|
+
for (var d = new Array(arguments.length - 1), c = 0; c < d.length; )
|
|
990
|
+
d[c] = arguments[++c];
|
|
991
|
+
if (c = 0, u = u.replace(/%([%dfijs])/g, function(p, m) {
|
|
992
|
+
var _ = d[c++];
|
|
993
993
|
switch (m) {
|
|
994
994
|
case "d":
|
|
995
995
|
case "f":
|
|
996
|
-
return String(Number(
|
|
996
|
+
return String(Number(_));
|
|
997
997
|
case "i":
|
|
998
|
-
return String(Math.floor(
|
|
998
|
+
return String(Math.floor(_));
|
|
999
999
|
case "j":
|
|
1000
|
-
return JSON.stringify(
|
|
1000
|
+
return JSON.stringify(_);
|
|
1001
1001
|
case "s":
|
|
1002
|
-
return String(
|
|
1002
|
+
return String(_);
|
|
1003
1003
|
}
|
|
1004
1004
|
return "%";
|
|
1005
|
-
}),
|
|
1005
|
+
}), c !== d.length)
|
|
1006
1006
|
throw Error("parameter count mismatch");
|
|
1007
1007
|
return n.push(u), a;
|
|
1008
1008
|
}
|
|
@@ -1250,8 +1250,8 @@ function requireField() {
|
|
|
1250
1250
|
t.fromJSON = function(o, r) {
|
|
1251
1251
|
return new t(o, r.id, r.type, r.rule, r.extend, r.options, r.comment);
|
|
1252
1252
|
};
|
|
1253
|
-
function t(s, o, r, l, d,
|
|
1254
|
-
if (a.isObject(l) ? (
|
|
1253
|
+
function t(s, o, r, l, d, c, h) {
|
|
1254
|
+
if (a.isObject(l) ? (h = d, c = l, l = d = void 0) : a.isObject(d) && (h = c, c = d, d = void 0), i.call(this, s, c), !a.isInteger(o) || o < 0)
|
|
1255
1255
|
throw TypeError("id must be a non-negative integer");
|
|
1256
1256
|
if (!a.isString(r))
|
|
1257
1257
|
throw TypeError("type must be a string");
|
|
@@ -1262,7 +1262,7 @@ function requireField() {
|
|
|
1262
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 = a.Long ? n.long[r] !== void 0 : (
|
|
1263
1263
|
/* istanbul ignore next */
|
|
1264
1264
|
!1
|
|
1265
|
-
), 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 = h;
|
|
1266
1266
|
}
|
|
1267
1267
|
return Object.defineProperty(t.prototype, "packed", {
|
|
1268
1268
|
get: function() {
|
|
@@ -1297,8 +1297,8 @@ function requireField() {
|
|
|
1297
1297
|
}
|
|
1298
1298
|
return this.map ? this.defaultValue = a.emptyObject : this.repeated ? this.defaultValue = a.emptyArray : this.defaultValue = this.typeDefault, this.parent instanceof f && (this.parent.ctor.prototype[this.name] = this.defaultValue), i.prototype.resolve.call(this);
|
|
1299
1299
|
}, t.d = function(o, r, l, d) {
|
|
1300
|
-
return typeof r == "function" ? r = a.decorateType(r).name : r && typeof r == "object" && (r = a.decorateEnum(r).name), function(
|
|
1301
|
-
a.decorateType(
|
|
1300
|
+
return typeof r == "function" ? r = a.decorateType(r).name : r && typeof r == "object" && (r = a.decorateEnum(r).name), function(h, p) {
|
|
1301
|
+
a.decorateType(h.constructor).add(new t(p, o, r, l, { default: d }));
|
|
1302
1302
|
};
|
|
1303
1303
|
}, t._configure = function(o) {
|
|
1304
1304
|
f = o;
|
|
@@ -1374,27 +1374,27 @@ function requireNamespace() {
|
|
|
1374
1374
|
var i = requireObject();
|
|
1375
1375
|
((o.prototype = Object.create(i.prototype)).constructor = o).className = "Namespace";
|
|
1376
1376
|
var e = requireField(), n = requireUtil(), a = requireOneof(), f, u, t;
|
|
1377
|
-
o.fromJSON = function(d,
|
|
1378
|
-
return new o(d,
|
|
1377
|
+
o.fromJSON = function(d, c) {
|
|
1378
|
+
return new o(d, c.options).addJSON(c.nested);
|
|
1379
1379
|
};
|
|
1380
1380
|
function s(l, d) {
|
|
1381
1381
|
if (l && l.length) {
|
|
1382
|
-
for (var
|
|
1383
|
-
|
|
1384
|
-
return
|
|
1382
|
+
for (var c = {}, h = 0; h < l.length; ++h)
|
|
1383
|
+
c[l[h].name] = l[h].toJSON(d);
|
|
1384
|
+
return c;
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
|
-
o.arrayToJSON = s, o.isReservedId = function(d,
|
|
1387
|
+
o.arrayToJSON = s, o.isReservedId = function(d, c) {
|
|
1388
1388
|
if (d) {
|
|
1389
|
-
for (var
|
|
1390
|
-
if (typeof d[
|
|
1389
|
+
for (var h = 0; h < d.length; ++h)
|
|
1390
|
+
if (typeof d[h] != "string" && d[h][0] <= c && d[h][1] > c)
|
|
1391
1391
|
return !0;
|
|
1392
1392
|
}
|
|
1393
1393
|
return !1;
|
|
1394
|
-
}, o.isReservedName = function(d,
|
|
1394
|
+
}, o.isReservedName = function(d, c) {
|
|
1395
1395
|
if (d) {
|
|
1396
|
-
for (var
|
|
1397
|
-
if (d[
|
|
1396
|
+
for (var h = 0; h < d.length; ++h)
|
|
1397
|
+
if (d[h] === c)
|
|
1398
1398
|
return !0;
|
|
1399
1399
|
}
|
|
1400
1400
|
return !1;
|
|
@@ -1417,12 +1417,12 @@ function requireNamespace() {
|
|
|
1417
1417
|
s(this.nestedArray, d)
|
|
1418
1418
|
]);
|
|
1419
1419
|
}, o.prototype.addJSON = function(d) {
|
|
1420
|
-
var
|
|
1420
|
+
var c = this;
|
|
1421
1421
|
if (d)
|
|
1422
|
-
for (var
|
|
1423
|
-
m = d[
|
|
1422
|
+
for (var h = Object.keys(d), p = 0, m; p < h.length; ++p)
|
|
1423
|
+
m = d[h[p]], c.add(
|
|
1424
1424
|
// most to least likely
|
|
1425
|
-
(m.fields !== void 0 ? f.fromJSON : m.values !== void 0 ? t.fromJSON : m.methods !== void 0 ? u.fromJSON : m.id !== void 0 ? e.fromJSON : o.fromJSON)(
|
|
1425
|
+
(m.fields !== void 0 ? f.fromJSON : m.values !== void 0 ? t.fromJSON : m.methods !== void 0 ? u.fromJSON : m.id !== void 0 ? e.fromJSON : o.fromJSON)(h[p], m)
|
|
1426
1426
|
);
|
|
1427
1427
|
return this;
|
|
1428
1428
|
}, o.prototype.get = function(d) {
|
|
@@ -1437,12 +1437,12 @@ function requireNamespace() {
|
|
|
1437
1437
|
if (!this.nested)
|
|
1438
1438
|
this.nested = {};
|
|
1439
1439
|
else {
|
|
1440
|
-
var
|
|
1441
|
-
if (
|
|
1442
|
-
if (
|
|
1443
|
-
for (var
|
|
1444
|
-
d.add(
|
|
1445
|
-
this.remove(
|
|
1440
|
+
var c = this.get(d.name);
|
|
1441
|
+
if (c)
|
|
1442
|
+
if (c instanceof o && d instanceof o && !(c instanceof f || c instanceof u)) {
|
|
1443
|
+
for (var h = c.nestedArray, p = 0; p < h.length; ++p)
|
|
1444
|
+
d.add(h[p]);
|
|
1445
|
+
this.remove(c), this.nested || (this.nested = {}), d.setOptions(c.options, !0);
|
|
1446
1446
|
} else
|
|
1447
1447
|
throw Error("duplicate name '" + d.name + "' in " + this);
|
|
1448
1448
|
}
|
|
@@ -1453,69 +1453,69 @@ function requireNamespace() {
|
|
|
1453
1453
|
if (d.parent !== this)
|
|
1454
1454
|
throw Error(d + " is not a member of " + this);
|
|
1455
1455
|
return delete this.nested[d.name], Object.keys(this.nested).length || (this.nested = void 0), d.onRemove(this), r(this);
|
|
1456
|
-
}, o.prototype.define = function(d,
|
|
1456
|
+
}, o.prototype.define = function(d, c) {
|
|
1457
1457
|
if (n.isString(d))
|
|
1458
1458
|
d = d.split(".");
|
|
1459
1459
|
else if (!Array.isArray(d))
|
|
1460
1460
|
throw TypeError("illegal path");
|
|
1461
1461
|
if (d && d.length && d[0] === "")
|
|
1462
1462
|
throw Error("path must be relative");
|
|
1463
|
-
for (var
|
|
1463
|
+
for (var h = this; d.length > 0; ) {
|
|
1464
1464
|
var p = d.shift();
|
|
1465
|
-
if (
|
|
1466
|
-
if (
|
|
1465
|
+
if (h.nested && h.nested[p]) {
|
|
1466
|
+
if (h = h.nested[p], !(h instanceof o))
|
|
1467
1467
|
throw Error("path conflicts with non-namespace objects");
|
|
1468
1468
|
} else
|
|
1469
|
-
|
|
1469
|
+
h.add(h = new o(p));
|
|
1470
1470
|
}
|
|
1471
|
-
return
|
|
1471
|
+
return c && h.addJSON(c), h;
|
|
1472
1472
|
}, o.prototype.resolveAll = function() {
|
|
1473
|
-
for (var d = this.nestedArray,
|
|
1474
|
-
d[
|
|
1473
|
+
for (var d = this.nestedArray, c = 0; c < d.length; )
|
|
1474
|
+
d[c] instanceof o ? d[c++].resolveAll() : d[c++].resolve();
|
|
1475
1475
|
return this.resolve();
|
|
1476
|
-
}, o.prototype.lookup = function(d,
|
|
1477
|
-
if (typeof
|
|
1476
|
+
}, o.prototype.lookup = function(d, c, h) {
|
|
1477
|
+
if (typeof c == "boolean" ? (h = c, c = void 0) : c && !Array.isArray(c) && (c = [c]), n.isString(d) && d.length) {
|
|
1478
1478
|
if (d === ".")
|
|
1479
1479
|
return this.root;
|
|
1480
1480
|
d = d.split(".");
|
|
1481
1481
|
} else if (!d.length)
|
|
1482
1482
|
return this;
|
|
1483
1483
|
if (d[0] === "")
|
|
1484
|
-
return this.root.lookup(d.slice(1),
|
|
1484
|
+
return this.root.lookup(d.slice(1), c);
|
|
1485
1485
|
var p = this.get(d[0]);
|
|
1486
1486
|
if (p) {
|
|
1487
1487
|
if (d.length === 1) {
|
|
1488
|
-
if (!
|
|
1488
|
+
if (!c || c.indexOf(p.constructor) > -1)
|
|
1489
1489
|
return p;
|
|
1490
|
-
} else if (p instanceof o && (p = p.lookup(d.slice(1),
|
|
1490
|
+
} else if (p instanceof o && (p = p.lookup(d.slice(1), c, !0)))
|
|
1491
1491
|
return p;
|
|
1492
1492
|
} else
|
|
1493
1493
|
for (var m = 0; m < this.nestedArray.length; ++m)
|
|
1494
|
-
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, c, !0)))
|
|
1495
1495
|
return p;
|
|
1496
|
-
return this.parent === null ||
|
|
1496
|
+
return this.parent === null || h ? null : this.parent.lookup(d, c);
|
|
1497
1497
|
}, o.prototype.lookupType = function(d) {
|
|
1498
|
-
var
|
|
1499
|
-
if (!
|
|
1498
|
+
var c = this.lookup(d, [f]);
|
|
1499
|
+
if (!c)
|
|
1500
1500
|
throw Error("no such type: " + d);
|
|
1501
|
-
return
|
|
1501
|
+
return c;
|
|
1502
1502
|
}, o.prototype.lookupEnum = function(d) {
|
|
1503
|
-
var
|
|
1504
|
-
if (!
|
|
1503
|
+
var c = this.lookup(d, [t]);
|
|
1504
|
+
if (!c)
|
|
1505
1505
|
throw Error("no such Enum '" + d + "' in " + this);
|
|
1506
|
-
return
|
|
1506
|
+
return c;
|
|
1507
1507
|
}, o.prototype.lookupTypeOrEnum = function(d) {
|
|
1508
|
-
var
|
|
1509
|
-
if (!
|
|
1508
|
+
var c = this.lookup(d, [f, t]);
|
|
1509
|
+
if (!c)
|
|
1510
1510
|
throw Error("no such Type or Enum '" + d + "' in " + this);
|
|
1511
|
-
return
|
|
1511
|
+
return c;
|
|
1512
1512
|
}, o.prototype.lookupService = function(d) {
|
|
1513
|
-
var
|
|
1514
|
-
if (!
|
|
1513
|
+
var c = this.lookup(d, [u]);
|
|
1514
|
+
if (!c)
|
|
1515
1515
|
throw Error("no such Service '" + d + "' in " + this);
|
|
1516
|
-
return
|
|
1517
|
-
}, o._configure = function(l, d,
|
|
1518
|
-
f = l, u = d, t =
|
|
1516
|
+
return c;
|
|
1517
|
+
}, o._configure = function(l, d, c) {
|
|
1518
|
+
f = l, u = d, t = c;
|
|
1519
1519
|
}, namespace;
|
|
1520
1520
|
}
|
|
1521
1521
|
var mapfield, hasRequiredMapfield;
|
|
@@ -1658,13 +1658,13 @@ function requireService() {
|
|
|
1658
1658
|
}
|
|
1659
1659
|
return i.prototype.remove.call(this, s);
|
|
1660
1660
|
}, f.prototype.create = function(s, o, r) {
|
|
1661
|
-
for (var l = new a.Service(s, o, r), d = 0,
|
|
1661
|
+
for (var l = new a.Service(s, o, r), d = 0, c; d < /* initializes */
|
|
1662
1662
|
this.methodsArray.length; ++d) {
|
|
1663
|
-
var
|
|
1664
|
-
l[
|
|
1665
|
-
m:
|
|
1666
|
-
q:
|
|
1667
|
-
s:
|
|
1663
|
+
var h = n.lcFirst((c = this._methodsArray[d]).resolve().name).replace(/[^$\w_]/g, "");
|
|
1664
|
+
l[h] = n.codegen(["r", "c"], n.isReserved(h) ? h + "_" : h)("return this.rpcCall(m,q,s,r,c)")({
|
|
1665
|
+
m: c,
|
|
1666
|
+
q: c.resolvedRequestType.ctor,
|
|
1667
|
+
s: c.resolvedResponseType.ctor
|
|
1668
1668
|
});
|
|
1669
1669
|
}
|
|
1670
1670
|
return l;
|
|
@@ -1712,8 +1712,8 @@ function requireDecoder() {
|
|
|
1712
1712
|
return "missing required '" + u.name + "'";
|
|
1713
1713
|
}
|
|
1714
1714
|
function f(u) {
|
|
1715
|
-
var t = n.codegen(["r", "l"], u.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (u.fieldsArray.filter(function(
|
|
1716
|
-
return
|
|
1715
|
+
var t = n.codegen(["r", "l"], u.name + "$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor" + (u.fieldsArray.filter(function(c) {
|
|
1716
|
+
return c.map;
|
|
1717
1717
|
}).length ? ",k,value" : ""))("while(r.pos<c){")("var t=r.uint32()");
|
|
1718
1718
|
u.group && t("if((t&7)===4)")("break"), t("switch(t>>>3){");
|
|
1719
1719
|
for (var s = 0; s < /* initializes */
|
|
@@ -1804,17 +1804,17 @@ function requireVerifier() {
|
|
|
1804
1804
|
o.length && s("var p={}");
|
|
1805
1805
|
for (var l = 0; l < /* initializes */
|
|
1806
1806
|
t.fieldsArray.length; ++l) {
|
|
1807
|
-
var d = t._fieldsArray[l].resolve(),
|
|
1808
|
-
if (d.optional && s("if(%s!=null&&m.hasOwnProperty(%j)){",
|
|
1809
|
-
s("if(!util.isObject(%s))",
|
|
1807
|
+
var d = t._fieldsArray[l].resolve(), c = "m" + e.safeProp(d.name);
|
|
1808
|
+
if (d.optional && s("if(%s!=null&&m.hasOwnProperty(%j)){", c, d.name), d.map)
|
|
1809
|
+
s("if(!util.isObject(%s))", c)("return%j", n(d, "object"))("var k=Object.keys(%s)", c)("for(var i=0;i<k.length;++i){"), f(s, d, "k[i]"), a(s, d, l, c + "[k[i]]")("}");
|
|
1810
1810
|
else if (d.repeated)
|
|
1811
|
-
s("if(!Array.isArray(%s))",
|
|
1811
|
+
s("if(!Array.isArray(%s))", c)("return%j", n(d, "array"))("for(var i=0;i<%s.length;++i){", c), a(s, d, l, c + "[i]")("}");
|
|
1812
1812
|
else {
|
|
1813
1813
|
if (d.partOf) {
|
|
1814
|
-
var
|
|
1815
|
-
r[d.partOf.name] === 1 && s("if(p%s===1)",
|
|
1814
|
+
var h = e.safeProp(d.partOf.name);
|
|
1815
|
+
r[d.partOf.name] === 1 && s("if(p%s===1)", h)("return%j", d.partOf.name + ": multiple values"), r[d.partOf.name] = 1, s("p%s=1", h);
|
|
1816
1816
|
}
|
|
1817
|
-
a(s, d, l,
|
|
1817
|
+
a(s, d, l, c);
|
|
1818
1818
|
}
|
|
1819
1819
|
d.optional && s("}");
|
|
1820
1820
|
}
|
|
@@ -1831,8 +1831,8 @@ function requireConverter() {
|
|
|
1831
1831
|
if (s.resolvedType)
|
|
1832
1832
|
if (s.resolvedType instanceof n) {
|
|
1833
1833
|
t("switch(d%s){", r);
|
|
1834
|
-
for (var d = s.resolvedType.values,
|
|
1835
|
-
d[h
|
|
1834
|
+
for (var d = s.resolvedType.values, c = Object.keys(d), h = 0; h < c.length; ++h)
|
|
1835
|
+
d[c[h]] === 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:", c[h])("case %i:", d[c[h]])("m%s=%j", r, d[c[h]])("break");
|
|
1836
1836
|
t("}");
|
|
1837
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);
|
|
1838
1838
|
else {
|
|
@@ -1877,25 +1877,25 @@ function requireConverter() {
|
|
|
1877
1877
|
if (!o.length) return r("return new this.ctor");
|
|
1878
1878
|
r("var m=new this.ctor");
|
|
1879
1879
|
for (var l = 0; l < o.length; ++l) {
|
|
1880
|
-
var d = o[l].resolve(),
|
|
1881
|
-
d.map ? (r("if(d%s){",
|
|
1880
|
+
var d = o[l].resolve(), c = a.safeProp(d.name);
|
|
1881
|
+
d.map ? (r("if(d%s){", c)('if(typeof d%s!=="object")', c)("throw TypeError(%j)", d.fullName + ": object expected")("m%s={}", c)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){", c), f(
|
|
1882
1882
|
r,
|
|
1883
1883
|
d,
|
|
1884
1884
|
/* not sorted */
|
|
1885
1885
|
l,
|
|
1886
|
-
|
|
1887
|
-
)("}")("}")) : d.repeated ? (r("if(d%s){",
|
|
1886
|
+
c + "[ks[i]]"
|
|
1887
|
+
)("}")("}")) : d.repeated ? (r("if(d%s){", c)("if(!Array.isArray(d%s))", c)("throw TypeError(%j)", d.fullName + ": array expected")("m%s=[]", c)("for(var i=0;i<d%s.length;++i){", c), f(
|
|
1888
1888
|
r,
|
|
1889
1889
|
d,
|
|
1890
1890
|
/* not sorted */
|
|
1891
1891
|
l,
|
|
1892
|
-
|
|
1893
|
-
)("}")("}")) : (d.resolvedType instanceof n || r("if(d%s!=null){",
|
|
1892
|
+
c + "[i]"
|
|
1893
|
+
)("}")("}")) : (d.resolvedType instanceof n || r("if(d%s!=null){", c), f(
|
|
1894
1894
|
r,
|
|
1895
1895
|
d,
|
|
1896
1896
|
/* not sorted */
|
|
1897
1897
|
l,
|
|
1898
|
-
|
|
1898
|
+
c
|
|
1899
1899
|
), d.resolvedType instanceof n || r("}"));
|
|
1900
1900
|
}
|
|
1901
1901
|
return r("return m");
|
|
@@ -1932,31 +1932,31 @@ function requireConverter() {
|
|
|
1932
1932
|
var o = s.fieldsArray.slice().sort(a.compareFieldsById);
|
|
1933
1933
|
if (!o.length)
|
|
1934
1934
|
return a.codegen()("return {}");
|
|
1935
|
-
for (var r = a.codegen(["m", "o"], s.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], d = [],
|
|
1936
|
-
o[
|
|
1935
|
+
for (var r = a.codegen(["m", "o"], s.name + "$toObject")("if(!o)")("o={}")("var d={}"), l = [], d = [], c = [], h = 0; h < o.length; ++h)
|
|
1936
|
+
o[h].partOf || (o[h].resolve().repeated ? l : o[h].map ? d : c).push(o[h]);
|
|
1937
1937
|
if (l.length) {
|
|
1938
|
-
for (r("if(o.arrays||o.defaults){"),
|
|
1938
|
+
for (r("if(o.arrays||o.defaults){"), h = 0; h < l.length; ++h) r("d%s=[]", a.safeProp(l[h].name));
|
|
1939
1939
|
r("}");
|
|
1940
1940
|
}
|
|
1941
1941
|
if (d.length) {
|
|
1942
|
-
for (r("if(o.objects||o.defaults){"),
|
|
1942
|
+
for (r("if(o.objects||o.defaults){"), h = 0; h < d.length; ++h) r("d%s={}", a.safeProp(d[h].name));
|
|
1943
1943
|
r("}");
|
|
1944
1944
|
}
|
|
1945
|
-
if (
|
|
1946
|
-
for (r("if(o.defaults){"),
|
|
1947
|
-
var p = h
|
|
1945
|
+
if (c.length) {
|
|
1946
|
+
for (r("if(o.defaults){"), h = 0; h < c.length; ++h) {
|
|
1947
|
+
var p = c[h], m = a.safeProp(p.name);
|
|
1948
1948
|
if (p.resolvedType instanceof n) r("d%s=o.enums===String?%j:%j", m, p.resolvedType.valuesById[p.typeDefault], p.typeDefault);
|
|
1949
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());
|
|
1950
1950
|
else if (p.bytes) {
|
|
1951
|
-
var
|
|
1952
|
-
r("if(o.bytes===String)d%s=%j", m, String.fromCharCode.apply(String, p.typeDefault))("else{")("d%s=%s", m,
|
|
1951
|
+
var _ = "[" + Array.prototype.slice.call(p.typeDefault).join(",") + "]";
|
|
1952
|
+
r("if(o.bytes===String)d%s=%j", m, String.fromCharCode.apply(String, p.typeDefault))("else{")("d%s=%s", m, _)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)", m, m)("}");
|
|
1953
1953
|
} else r("d%s=%j", m, p.typeDefault);
|
|
1954
1954
|
}
|
|
1955
1955
|
r("}");
|
|
1956
1956
|
}
|
|
1957
1957
|
var v = !1;
|
|
1958
|
-
for (
|
|
1959
|
-
var p = o[
|
|
1958
|
+
for (h = 0; h < o.length; ++h) {
|
|
1959
|
+
var p = o[h], y = s._fieldsArray.indexOf(p), m = a.safeProp(p.name);
|
|
1960
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){"), u(
|
|
1961
1961
|
r,
|
|
1962
1962
|
p,
|
|
@@ -2019,7 +2019,7 @@ function requireType() {
|
|
|
2019
2019
|
hasRequiredType = 1, type = m;
|
|
2020
2020
|
var i = requireNamespace();
|
|
2021
2021
|
((m.prototype = Object.create(i.prototype)).constructor = m).className = "Type";
|
|
2022
|
-
var e = require_enum(), n = requireOneof(), a = requireField(), f = requireMapfield(), u = requireService(), t = message, s = reader, o = writer, r = requireUtil(), l = requireEncoder(), d = requireDecoder(),
|
|
2022
|
+
var e = require_enum(), n = requireOneof(), a = requireField(), f = requireMapfield(), u = requireService(), t = message, s = reader, o = writer, r = requireUtil(), l = requireEncoder(), d = requireDecoder(), c = requireVerifier(), h = requireConverter(), p = wrappers;
|
|
2023
2023
|
function m(v, y) {
|
|
2024
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;
|
|
2025
2025
|
}
|
|
@@ -2036,10 +2036,10 @@ function requireType() {
|
|
|
2036
2036
|
return this._fieldsById;
|
|
2037
2037
|
this._fieldsById = {};
|
|
2038
2038
|
for (var v = Object.keys(this.fields), y = 0; y < v.length; ++y) {
|
|
2039
|
-
var g = this.fields[v[y]],
|
|
2040
|
-
if (this._fieldsById[
|
|
2041
|
-
throw Error("duplicate id " +
|
|
2042
|
-
this._fieldsById[
|
|
2039
|
+
var g = this.fields[v[y]], b = g.id;
|
|
2040
|
+
if (this._fieldsById[b])
|
|
2041
|
+
throw Error("duplicate id " + b + " in " + this);
|
|
2042
|
+
this._fieldsById[b] = g;
|
|
2043
2043
|
}
|
|
2044
2044
|
return this._fieldsById;
|
|
2045
2045
|
}
|
|
@@ -2082,45 +2082,45 @@ function requireType() {
|
|
|
2082
2082
|
for (var g = 0; g < /* initializes */
|
|
2083
2083
|
this.fieldsArray.length; ++g)
|
|
2084
2084
|
this._fieldsArray[g].resolve();
|
|
2085
|
-
var
|
|
2085
|
+
var b = {};
|
|
2086
2086
|
for (g = 0; g < /* initializes */
|
|
2087
2087
|
this.oneofsArray.length; ++g)
|
|
2088
|
-
|
|
2088
|
+
b[this._oneofsArray[g].resolve().name] = {
|
|
2089
2089
|
get: r.oneOfGetter(this._oneofsArray[g].oneof),
|
|
2090
2090
|
set: r.oneOfSetter(this._oneofsArray[g].oneof)
|
|
2091
2091
|
};
|
|
2092
|
-
g && Object.defineProperties(v.prototype,
|
|
2092
|
+
g && Object.defineProperties(v.prototype, b);
|
|
2093
2093
|
}
|
|
2094
2094
|
}
|
|
2095
2095
|
}), m.generateConstructor = function(y) {
|
|
2096
|
-
for (var g = r.codegen(["p"], y.name),
|
|
2097
|
-
(R = y._fieldsArray[
|
|
2096
|
+
for (var g = r.codegen(["p"], y.name), b = 0, R; b < y.fieldsArray.length; ++b)
|
|
2097
|
+
(R = y._fieldsArray[b]).map ? g("this%s={}", r.safeProp(R.name)) : R.repeated && g("this%s=[]", r.safeProp(R.name));
|
|
2098
2098
|
return g("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]");
|
|
2099
2099
|
};
|
|
2100
|
-
function
|
|
2100
|
+
function _(v) {
|
|
2101
2101
|
return v._fieldsById = v._fieldsArray = v._oneofsArray = null, delete v.encode, delete v.decode, delete v.verify, v;
|
|
2102
2102
|
}
|
|
2103
2103
|
return m.fromJSON = function(y, g) {
|
|
2104
|
-
var
|
|
2105
|
-
|
|
2104
|
+
var b = new m(y, g.options);
|
|
2105
|
+
b.extensions = g.extensions, b.reserved = g.reserved;
|
|
2106
2106
|
for (var R = Object.keys(g.fields), O = 0; O < R.length; ++O)
|
|
2107
|
-
|
|
2107
|
+
b.add(
|
|
2108
2108
|
(typeof g.fields[R[O]].keyType < "u" ? f.fromJSON : a.fromJSON)(R[O], g.fields[R[O]])
|
|
2109
2109
|
);
|
|
2110
2110
|
if (g.oneofs)
|
|
2111
2111
|
for (R = Object.keys(g.oneofs), O = 0; O < R.length; ++O)
|
|
2112
|
-
|
|
2112
|
+
b.add(n.fromJSON(R[O], g.oneofs[R[O]]));
|
|
2113
2113
|
if (g.nested)
|
|
2114
2114
|
for (R = Object.keys(g.nested), O = 0; O < R.length; ++O) {
|
|
2115
2115
|
var T = g.nested[R[O]];
|
|
2116
|
-
|
|
2116
|
+
b.add(
|
|
2117
2117
|
// most to least likely
|
|
2118
2118
|
(T.id !== void 0 ? a.fromJSON : T.fields !== void 0 ? m.fromJSON : T.values !== void 0 ? e.fromJSON : T.methods !== void 0 ? u.fromJSON : i.fromJSON)(R[O], T)
|
|
2119
2119
|
);
|
|
2120
2120
|
}
|
|
2121
|
-
return g.extensions && g.extensions.length && (
|
|
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;
|
|
2122
2122
|
}, m.prototype.toJSON = function(y) {
|
|
2123
|
-
var g = i.prototype.toJSON.call(this, y),
|
|
2123
|
+
var g = i.prototype.toJSON.call(this, y), b = y ? !!y.keepComments : !1;
|
|
2124
2124
|
return r.toObject([
|
|
2125
2125
|
"options",
|
|
2126
2126
|
g && g.options || void 0,
|
|
@@ -2139,14 +2139,14 @@ function requireType() {
|
|
|
2139
2139
|
"nested",
|
|
2140
2140
|
g && g.nested || void 0,
|
|
2141
2141
|
"comment",
|
|
2142
|
-
|
|
2142
|
+
b ? this.comment : void 0
|
|
2143
2143
|
]);
|
|
2144
2144
|
}, m.prototype.resolveAll = function() {
|
|
2145
2145
|
for (var y = this.fieldsArray, g = 0; g < y.length; )
|
|
2146
2146
|
y[g++].resolve();
|
|
2147
|
-
var
|
|
2148
|
-
for (g = 0; g <
|
|
2149
|
-
|
|
2147
|
+
var b = this.oneofsArray;
|
|
2148
|
+
for (g = 0; g < b.length; )
|
|
2149
|
+
b[g++].resolve();
|
|
2150
2150
|
return i.prototype.resolveAll.call(this);
|
|
2151
2151
|
}, m.prototype.get = function(y) {
|
|
2152
2152
|
return this.fields[y] || this.oneofs && this.oneofs[y] || this.nested && this.nested[y] || null;
|
|
@@ -2163,19 +2163,19 @@ function requireType() {
|
|
|
2163
2163
|
throw Error("id " + y.id + " is reserved in " + this);
|
|
2164
2164
|
if (this.isReservedName(y.name))
|
|
2165
2165
|
throw Error("name '" + y.name + "' is reserved in " + this);
|
|
2166
|
-
return y.parent && y.parent.remove(y), this.fields[y.name] = y, y.message = this, y.onAdd(this),
|
|
2166
|
+
return y.parent && y.parent.remove(y), this.fields[y.name] = y, y.message = this, y.onAdd(this), _(this);
|
|
2167
2167
|
}
|
|
2168
|
-
return y instanceof n ? (this.oneofs || (this.oneofs = {}), this.oneofs[y.name] = y, y.onAdd(this),
|
|
2168
|
+
return y instanceof n ? (this.oneofs || (this.oneofs = {}), this.oneofs[y.name] = y, y.onAdd(this), _(this)) : i.prototype.add.call(this, y);
|
|
2169
2169
|
}, m.prototype.remove = function(y) {
|
|
2170
2170
|
if (y instanceof a && y.extend === void 0) {
|
|
2171
2171
|
if (!this.fields || this.fields[y.name] !== y)
|
|
2172
2172
|
throw Error(y + " is not a member of " + this);
|
|
2173
|
-
return delete this.fields[y.name], y.parent = null, y.onRemove(this),
|
|
2173
|
+
return delete this.fields[y.name], y.parent = null, y.onRemove(this), _(this);
|
|
2174
2174
|
}
|
|
2175
2175
|
if (y instanceof n) {
|
|
2176
2176
|
if (!this.oneofs || this.oneofs[y.name] !== y)
|
|
2177
2177
|
throw Error(y + " is not a member of " + this);
|
|
2178
|
-
return delete this.oneofs[y.name], y.parent = null, y.onRemove(this),
|
|
2178
|
+
return delete this.oneofs[y.name], y.parent = null, y.onRemove(this), _(this);
|
|
2179
2179
|
}
|
|
2180
2180
|
return i.prototype.remove.call(this, y);
|
|
2181
2181
|
}, m.prototype.isReservedId = function(y) {
|
|
@@ -2185,9 +2185,9 @@ function requireType() {
|
|
|
2185
2185
|
}, m.prototype.create = function(y) {
|
|
2186
2186
|
return new this.ctor(y);
|
|
2187
2187
|
}, m.prototype.setup = function() {
|
|
2188
|
-
for (var y = this.fullName, g = [],
|
|
2189
|
-
this.fieldsArray.length; ++
|
|
2190
|
-
g.push(this._fieldsArray[
|
|
2188
|
+
for (var y = this.fullName, g = [], b = 0; b < /* initializes */
|
|
2189
|
+
this.fieldsArray.length; ++b)
|
|
2190
|
+
g.push(this._fieldsArray[b].resolve().resolvedType);
|
|
2191
2191
|
this.encode = l(this)({
|
|
2192
2192
|
Writer: o,
|
|
2193
2193
|
types: g,
|
|
@@ -2196,13 +2196,13 @@ function requireType() {
|
|
|
2196
2196
|
Reader: s,
|
|
2197
2197
|
types: g,
|
|
2198
2198
|
util: r
|
|
2199
|
-
}), this.verify =
|
|
2199
|
+
}), this.verify = c(this)({
|
|
2200
2200
|
types: g,
|
|
2201
2201
|
util: r
|
|
2202
|
-
}), this.fromObject =
|
|
2202
|
+
}), this.fromObject = h.fromObject(this)({
|
|
2203
2203
|
types: g,
|
|
2204
2204
|
util: r
|
|
2205
|
-
}), this.toObject =
|
|
2205
|
+
}), this.toObject = h.toObject(this)({
|
|
2206
2206
|
types: g,
|
|
2207
2207
|
util: r
|
|
2208
2208
|
});
|
|
@@ -2227,8 +2227,8 @@ function requireType() {
|
|
|
2227
2227
|
}, m.prototype.toObject = function(y, g) {
|
|
2228
2228
|
return this.setup().toObject(y, g);
|
|
2229
2229
|
}, m.d = function(y) {
|
|
2230
|
-
return function(
|
|
2231
|
-
r.decorateType(
|
|
2230
|
+
return function(b) {
|
|
2231
|
+
r.decorateType(b, y);
|
|
2232
2232
|
};
|
|
2233
2233
|
}, type;
|
|
2234
2234
|
}
|
|
@@ -2239,152 +2239,152 @@ function requireRoot() {
|
|
|
2239
2239
|
var i = requireNamespace();
|
|
2240
2240
|
((o.prototype = Object.create(i.prototype)).constructor = o).className = "Root";
|
|
2241
2241
|
var e = requireField(), n = require_enum(), a = requireOneof(), f = requireUtil(), u, t, s;
|
|
2242
|
-
function o(
|
|
2243
|
-
i.call(this, "",
|
|
2242
|
+
function o(c) {
|
|
2243
|
+
i.call(this, "", c), this.deferred = [], this.files = [];
|
|
2244
2244
|
}
|
|
2245
|
-
o.fromJSON = function(
|
|
2246
|
-
return p || (p = new o()),
|
|
2245
|
+
o.fromJSON = function(h, p) {
|
|
2246
|
+
return p || (p = new o()), h.options && p.setOptions(h.options), p.addJSON(h.nested);
|
|
2247
2247
|
}, o.prototype.resolvePath = f.path.resolve, o.prototype.fetch = f.fetch;
|
|
2248
2248
|
function r() {
|
|
2249
2249
|
}
|
|
2250
|
-
o.prototype.load = function h
|
|
2250
|
+
o.prototype.load = function c(h, p, m) {
|
|
2251
2251
|
typeof p == "function" && (m = p, p = void 0);
|
|
2252
|
-
var
|
|
2252
|
+
var _ = this;
|
|
2253
2253
|
if (!m)
|
|
2254
|
-
return f.asPromise(
|
|
2254
|
+
return f.asPromise(c, _, h, p);
|
|
2255
2255
|
var v = m === r;
|
|
2256
|
-
function y(q,
|
|
2256
|
+
function y(q, k) {
|
|
2257
2257
|
if (m) {
|
|
2258
2258
|
if (v)
|
|
2259
2259
|
throw q;
|
|
2260
|
-
var
|
|
2261
|
-
m = null,
|
|
2260
|
+
var A = m;
|
|
2261
|
+
m = null, A(q, k);
|
|
2262
2262
|
}
|
|
2263
2263
|
}
|
|
2264
2264
|
function g(q) {
|
|
2265
|
-
var
|
|
2266
|
-
if (
|
|
2267
|
-
var
|
|
2268
|
-
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;
|
|
2269
2269
|
}
|
|
2270
2270
|
return null;
|
|
2271
2271
|
}
|
|
2272
|
-
function
|
|
2272
|
+
function b(q, k) {
|
|
2273
2273
|
try {
|
|
2274
|
-
if (f.isString(
|
|
2275
|
-
|
|
2274
|
+
if (f.isString(k) && k.charAt(0) === "{" && (k = JSON.parse(k)), !f.isString(k))
|
|
2275
|
+
_.setOptions(k.options).addJSON(k.nested);
|
|
2276
2276
|
else {
|
|
2277
2277
|
t.filename = q;
|
|
2278
|
-
var
|
|
2279
|
-
if (
|
|
2280
|
-
for (;
|
|
2281
|
-
(B = g(
|
|
2282
|
-
if (
|
|
2283
|
-
for (
|
|
2284
|
-
(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);
|
|
2285
2285
|
}
|
|
2286
2286
|
} catch (V) {
|
|
2287
2287
|
y(V);
|
|
2288
2288
|
}
|
|
2289
|
-
!v && !O && y(null,
|
|
2289
|
+
!v && !O && y(null, _);
|
|
2290
2290
|
}
|
|
2291
|
-
function R(q,
|
|
2292
|
-
if (q = g(q) || q, !(
|
|
2293
|
-
if (
|
|
2294
|
-
v ?
|
|
2295
|
-
--O,
|
|
2291
|
+
function R(q, k) {
|
|
2292
|
+
if (q = g(q) || q, !(_.files.indexOf(q) > -1)) {
|
|
2293
|
+
if (_.files.push(q), q in s) {
|
|
2294
|
+
v ? b(q, s[q]) : (++O, setTimeout(function() {
|
|
2295
|
+
--O, b(q, s[q]);
|
|
2296
2296
|
}));
|
|
2297
2297
|
return;
|
|
2298
2298
|
}
|
|
2299
2299
|
if (v) {
|
|
2300
|
-
var
|
|
2300
|
+
var A;
|
|
2301
2301
|
try {
|
|
2302
|
-
|
|
2302
|
+
A = f.fs.readFileSync(q).toString("utf8");
|
|
2303
2303
|
} catch (B) {
|
|
2304
|
-
|
|
2304
|
+
k || y(B);
|
|
2305
2305
|
return;
|
|
2306
2306
|
}
|
|
2307
|
-
|
|
2307
|
+
b(q, A);
|
|
2308
2308
|
} else
|
|
2309
|
-
++O,
|
|
2309
|
+
++O, _.fetch(q, function(B, E) {
|
|
2310
2310
|
if (--O, !!m) {
|
|
2311
2311
|
if (B) {
|
|
2312
|
-
|
|
2312
|
+
k ? O || y(null, _) : y(B);
|
|
2313
2313
|
return;
|
|
2314
2314
|
}
|
|
2315
|
-
|
|
2315
|
+
b(q, E);
|
|
2316
2316
|
}
|
|
2317
2317
|
});
|
|
2318
2318
|
}
|
|
2319
2319
|
}
|
|
2320
2320
|
var O = 0;
|
|
2321
|
-
f.isString(
|
|
2322
|
-
for (var T = 0, J; T <
|
|
2323
|
-
(J =
|
|
2321
|
+
f.isString(h) && (h = [h]);
|
|
2322
|
+
for (var T = 0, J; T < h.length; ++T)
|
|
2323
|
+
(J = _.resolvePath("", h[T])) && R(J);
|
|
2324
2324
|
if (v)
|
|
2325
|
-
return
|
|
2326
|
-
O || y(null,
|
|
2327
|
-
}, o.prototype.loadSync = function(
|
|
2325
|
+
return _;
|
|
2326
|
+
O || y(null, _);
|
|
2327
|
+
}, o.prototype.loadSync = function(h, p) {
|
|
2328
2328
|
if (!f.isNode)
|
|
2329
2329
|
throw Error("not supported");
|
|
2330
|
-
return this.load(
|
|
2330
|
+
return this.load(h, p, r);
|
|
2331
2331
|
}, o.prototype.resolveAll = function() {
|
|
2332
2332
|
if (this.deferred.length)
|
|
2333
|
-
throw Error("unresolvable extensions: " + this.deferred.map(function(
|
|
2334
|
-
return "'extend " +
|
|
2333
|
+
throw Error("unresolvable extensions: " + this.deferred.map(function(h) {
|
|
2334
|
+
return "'extend " + h.extend + "' in " + h.parent.fullName;
|
|
2335
2335
|
}).join(", "));
|
|
2336
2336
|
return i.prototype.resolveAll.call(this);
|
|
2337
2337
|
};
|
|
2338
2338
|
var l = /^[A-Z]/;
|
|
2339
|
-
function d(
|
|
2340
|
-
var p =
|
|
2339
|
+
function d(c, h) {
|
|
2340
|
+
var p = h.parent.lookup(h.extend);
|
|
2341
2341
|
if (p) {
|
|
2342
|
-
var m = new e(
|
|
2343
|
-
return p.get(m.name) || (m.declaringField =
|
|
2342
|
+
var m = new e(h.fullName, h.id, h.type, h.rule, void 0, h.options);
|
|
2343
|
+
return p.get(m.name) || (m.declaringField = h, h.extensionField = m, p.add(m)), !0;
|
|
2344
2344
|
}
|
|
2345
2345
|
return !1;
|
|
2346
2346
|
}
|
|
2347
|
-
return o.prototype._handleAdd = function(
|
|
2348
|
-
if (
|
|
2347
|
+
return o.prototype._handleAdd = function(h) {
|
|
2348
|
+
if (h instanceof e)
|
|
2349
2349
|
/* an extension field (implies not part of a oneof) */
|
|
2350
|
-
|
|
2351
|
-
!
|
|
2352
|
-
else if (
|
|
2353
|
-
l.test(
|
|
2354
|
-
else if (!(
|
|
2355
|
-
if (
|
|
2350
|
+
h.extend !== void 0 && /* not already handled */
|
|
2351
|
+
!h.extensionField && (d(this, h) || this.deferred.push(h));
|
|
2352
|
+
else if (h instanceof n)
|
|
2353
|
+
l.test(h.name) && (h.parent[h.name] = h.values);
|
|
2354
|
+
else if (!(h instanceof a)) {
|
|
2355
|
+
if (h instanceof u)
|
|
2356
2356
|
for (var p = 0; p < this.deferred.length; )
|
|
2357
2357
|
d(this, this.deferred[p]) ? this.deferred.splice(p, 1) : ++p;
|
|
2358
2358
|
for (var m = 0; m < /* initializes */
|
|
2359
|
-
|
|
2360
|
-
this._handleAdd(
|
|
2361
|
-
l.test(
|
|
2359
|
+
h.nestedArray.length; ++m)
|
|
2360
|
+
this._handleAdd(h._nestedArray[m]);
|
|
2361
|
+
l.test(h.name) && (h.parent[h.name] = h);
|
|
2362
2362
|
}
|
|
2363
|
-
}, o.prototype._handleRemove = function(
|
|
2364
|
-
if (
|
|
2363
|
+
}, o.prototype._handleRemove = function(h) {
|
|
2364
|
+
if (h instanceof e) {
|
|
2365
2365
|
if (
|
|
2366
2366
|
/* an extension field */
|
|
2367
|
-
|
|
2367
|
+
h.extend !== void 0
|
|
2368
2368
|
)
|
|
2369
2369
|
if (
|
|
2370
2370
|
/* already handled */
|
|
2371
|
-
|
|
2371
|
+
h.extensionField
|
|
2372
2372
|
)
|
|
2373
|
-
|
|
2373
|
+
h.extensionField.parent.remove(h.extensionField), h.extensionField = null;
|
|
2374
2374
|
else {
|
|
2375
|
-
var p = this.deferred.indexOf(
|
|
2375
|
+
var p = this.deferred.indexOf(h);
|
|
2376
2376
|
p > -1 && this.deferred.splice(p, 1);
|
|
2377
2377
|
}
|
|
2378
|
-
} else if (
|
|
2379
|
-
l.test(
|
|
2380
|
-
else if (
|
|
2378
|
+
} else if (h instanceof n)
|
|
2379
|
+
l.test(h.name) && delete h.parent[h.name];
|
|
2380
|
+
else if (h instanceof i) {
|
|
2381
2381
|
for (var m = 0; m < /* initializes */
|
|
2382
|
-
|
|
2383
|
-
this._handleRemove(
|
|
2384
|
-
l.test(
|
|
2382
|
+
h.nestedArray.length; ++m)
|
|
2383
|
+
this._handleRemove(h._nestedArray[m]);
|
|
2384
|
+
l.test(h.name) && delete h.parent[h.name];
|
|
2385
2385
|
}
|
|
2386
|
-
}, o._configure = function(
|
|
2387
|
-
u =
|
|
2386
|
+
}, o._configure = function(c, h, p) {
|
|
2387
|
+
u = c, t = h, s = p;
|
|
2388
2388
|
}, root;
|
|
2389
2389
|
}
|
|
2390
2390
|
var hasRequiredUtil;
|
|
@@ -2394,15 +2394,15 @@ function requireUtil() {
|
|
|
2394
2394
|
var i = util$1.exports = requireMinimal(), e = roots, n, a;
|
|
2395
2395
|
i.codegen = codegen_1, i.fetch = fetch_1, i.path = path, i.fs = i.inquire("fs"), i.toArray = function(r) {
|
|
2396
2396
|
if (r) {
|
|
2397
|
-
for (var l = Object.keys(r), d = new Array(l.length),
|
|
2398
|
-
d[
|
|
2397
|
+
for (var l = Object.keys(r), d = new Array(l.length), c = 0; c < l.length; )
|
|
2398
|
+
d[c] = r[l[c++]];
|
|
2399
2399
|
return d;
|
|
2400
2400
|
}
|
|
2401
2401
|
return [];
|
|
2402
2402
|
}, i.toObject = function(r) {
|
|
2403
2403
|
for (var l = {}, d = 0; d < r.length; ) {
|
|
2404
|
-
var
|
|
2405
|
-
|
|
2404
|
+
var c = r[d++], h = r[d++];
|
|
2405
|
+
h !== void 0 && (l[c] = h);
|
|
2406
2406
|
}
|
|
2407
2407
|
return l;
|
|
2408
2408
|
};
|
|
@@ -2436,23 +2436,23 @@ function requireUtil() {
|
|
|
2436
2436
|
var l = new a("Enum" + s++, r);
|
|
2437
2437
|
return i.decorateRoot.add(l), Object.defineProperty(r, "$type", { value: l, enumerable: !1 }), l;
|
|
2438
2438
|
}, i.setProperty = function(r, l, d) {
|
|
2439
|
-
function h
|
|
2440
|
-
var
|
|
2441
|
-
if (
|
|
2442
|
-
return
|
|
2439
|
+
function c(h, p, m) {
|
|
2440
|
+
var _ = p.shift();
|
|
2441
|
+
if (_ === "__proto__" || _ === "prototype")
|
|
2442
|
+
return h;
|
|
2443
2443
|
if (p.length > 0)
|
|
2444
|
-
|
|
2444
|
+
h[_] = c(h[_] || {}, p, m);
|
|
2445
2445
|
else {
|
|
2446
|
-
var v =
|
|
2447
|
-
v && (m = [].concat(v).concat(m)),
|
|
2446
|
+
var v = h[_];
|
|
2447
|
+
v && (m = [].concat(v).concat(m)), h[_] = m;
|
|
2448
2448
|
}
|
|
2449
|
-
return
|
|
2449
|
+
return h;
|
|
2450
2450
|
}
|
|
2451
2451
|
if (typeof r != "object")
|
|
2452
2452
|
throw TypeError("dst must be an object");
|
|
2453
2453
|
if (!l)
|
|
2454
2454
|
throw TypeError("path must be specified");
|
|
2455
|
-
return l = l.split("."),
|
|
2455
|
+
return l = l.split("."), c(r, l, d);
|
|
2456
2456
|
}, Object.defineProperty(i, "decorateRoot", {
|
|
2457
2457
|
get: function() {
|
|
2458
2458
|
return e.decorated || (e.decorated = new (requireRoot())());
|
|
@@ -2621,8 +2621,8 @@ function requireEncoder() {
|
|
|
2621
2621
|
/* initializes */
|
|
2622
2622
|
u.fieldsArray.slice().sort(n.compareFieldsById)
|
|
2623
2623
|
), s = 0; s < r.length; ++s) {
|
|
2624
|
-
var l = r[s].resolve(), d = u._fieldsArray.indexOf(l),
|
|
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),
|
|
2624
|
+
var l = r[s].resolve(), d = u._fieldsArray.indexOf(l), c = l.resolvedType instanceof i ? "int32" : l.type, h = e.basic[c];
|
|
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), h === 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 | h, c, o), t("}")("}")) : l.repeated ? (t("if(%s!=null&&%s.length){", o, o), l.packed && e.packed[c] !== 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])", c, o)("w.ldelim()") : (t("for(var i=0;i<%s.length;++i)", o), h === void 0 ? a(t, l, d, o + "[i]") : t("w.uint32(%i).%s(%s[i])", (l.id << 3 | h) >>> 0, c, o)), t("}")) : (l.optional && t("if(%s!=null&&Object.hasOwnProperty.call(m,%j))", o, l.name), h === void 0 ? a(t, l, d, o) : t("w.uint32(%i).%s(%s)", (l.id << 3 | h) >>> 0, c, o));
|
|
2626
2626
|
}
|
|
2627
2627
|
return t("return w");
|
|
2628
2628
|
}
|
|
@@ -2661,7 +2661,7 @@ protobuf.Namespace._configure(protobuf.Type, protobuf.Service, protobuf.Enum);
|
|
|
2661
2661
|
protobuf.Root._configure(protobuf.Type);
|
|
2662
2662
|
protobuf.Field._configure(protobuf.Type);
|
|
2663
2663
|
var indexLightExports = indexLight.exports, light = indexLightExports;
|
|
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,
|
|
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(
|
|
2665
2665
|
"nil.xit.proto"
|
|
2666
2666
|
), bundle = async (i) => new Promise((e, n) => {
|
|
2667
2667
|
const a = new WorkerWrapper();
|
|
@@ -2699,11 +2699,11 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2699
2699
|
header(nil_xit_proto.MessageType.MessageType_ValueRequest),
|
|
2700
2700
|
nil_xit_proto.ValueRequest.encode({ id: i, tag: e }).finish()
|
|
2701
2701
|
]),
|
|
2702
|
-
(
|
|
2703
|
-
if (
|
|
2704
|
-
const
|
|
2705
|
-
if (
|
|
2706
|
-
return
|
|
2702
|
+
(s, o) => {
|
|
2703
|
+
if (s === nil_xit_proto.MessageType.MessageType_ValueResponse) {
|
|
2704
|
+
const r = nil_xit_proto.ValueResponse.decode(o);
|
|
2705
|
+
if (r.id === i && e === r.tag)
|
|
2706
|
+
return r.values;
|
|
2707
2707
|
}
|
|
2708
2708
|
}
|
|
2709
2709
|
), u = {
|
|
@@ -2713,26 +2713,46 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2713
2713
|
value_string: /* @__PURE__ */ new Map(),
|
|
2714
2714
|
value_buffer: /* @__PURE__ */ new Map()
|
|
2715
2715
|
};
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
r.
|
|
2719
|
-
|
|
2716
|
+
let t = !1;
|
|
2717
|
+
for (const s of f) {
|
|
2718
|
+
const o = s.id, r = s.value, l = writable(s[r]);
|
|
2719
|
+
l.subscribe((d) => {
|
|
2720
|
+
if (t)
|
|
2721
|
+
return;
|
|
2722
|
+
const c = { id: o, [r]: d, value: r }, h = { id: i, tag: e, value: c };
|
|
2720
2723
|
a.publish(
|
|
2721
2724
|
concat([
|
|
2722
2725
|
header(nil_xit_proto.MessageType.MessageType_ValueUpdate),
|
|
2723
2726
|
nil_xit_proto.ValueUpdate.encode(h).finish()
|
|
2724
2727
|
])
|
|
2725
2728
|
);
|
|
2726
|
-
}), u[
|
|
2729
|
+
}), u[r].set(o, l);
|
|
2727
2730
|
}
|
|
2728
|
-
return a.on_message((
|
|
2729
|
-
var
|
|
2730
|
-
const
|
|
2731
|
-
if (
|
|
2732
|
-
const
|
|
2733
|
-
if (
|
|
2734
|
-
|
|
2735
|
-
c == null
|
|
2731
|
+
return a.on_message((s, o) => {
|
|
2732
|
+
var d;
|
|
2733
|
+
const r = new DataView(o.buffer).getUint32(0, !1), l = o.slice(4);
|
|
2734
|
+
if (r === nil_xit_proto.MessageType.MessageType_ValueUpdate) {
|
|
2735
|
+
const c = nil_xit_proto.ValueUpdate.decode(l);
|
|
2736
|
+
if (c.id === i && (c.tag === null || e === c.tag)) {
|
|
2737
|
+
t = !0;
|
|
2738
|
+
const h = c.value.value, p = (d = u[h]) == null ? void 0 : d.get(c.value.id);
|
|
2739
|
+
if (h === "value_buffer") {
|
|
2740
|
+
const m = c.value[h], _ = get(p);
|
|
2741
|
+
let v = !0;
|
|
2742
|
+
if (m.length != _.length)
|
|
2743
|
+
v = !1;
|
|
2744
|
+
else {
|
|
2745
|
+
const y = m.length;
|
|
2746
|
+
for (let g = 0; g < y; g++)
|
|
2747
|
+
if (m[g] !== _[g]) {
|
|
2748
|
+
v = !1;
|
|
2749
|
+
break;
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
v || p == null || p.set(m);
|
|
2753
|
+
} else
|
|
2754
|
+
p == null || p.set(c.value[h]);
|
|
2755
|
+
t = !1;
|
|
2736
2756
|
}
|
|
2737
2757
|
}
|
|
2738
2758
|
}), u;
|
|
@@ -2823,34 +2843,44 @@ const protobufjs = /* @__PURE__ */ getDefaultExportFromCjs(light), proto_data =
|
|
|
2823
2843
|
},
|
|
2824
2844
|
loader: n
|
|
2825
2845
|
}), create_app = async (i, e, n, a, f) => {
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2846
|
+
const u = { host: i };
|
|
2847
|
+
await test_connection(u);
|
|
2848
|
+
const t = new Service$1(u), [s, o, { nil_xit_fn: r }] = await Promise.all([
|
|
2849
|
+
make_values({ id: e, tag: n, host: i, service: t }),
|
|
2850
|
+
make_signals({ id: e, tag: n, host: i, service: t }),
|
|
2830
2851
|
bundle({ host: i, cdn_url: a, id: e })
|
|
2831
|
-
]),
|
|
2832
|
-
svelte: () => import("./svelte/index.js").then((
|
|
2833
|
-
"svelte/store": () => import("./svelte/store.js").then((
|
|
2852
|
+
]), l = {
|
|
2853
|
+
svelte: () => import("./svelte/index.js").then((p) => p.bT),
|
|
2854
|
+
"svelte/store": () => import("./svelte/store.js").then((p) => p.i),
|
|
2834
2855
|
"svelte/animate": () => import("./svelte/animate.js"),
|
|
2835
2856
|
"svelte/easing": () => import("./svelte/easing.js"),
|
|
2836
2857
|
"svelte/events": () => import("./svelte/events.js"),
|
|
2837
|
-
"svelte/motion": () => import("./svelte/motion.js").then((
|
|
2858
|
+
"svelte/motion": () => import("./svelte/motion.js").then((p) => p.i),
|
|
2838
2859
|
"svelte/transition": () => import("./svelte/transition.js"),
|
|
2839
2860
|
// @ts-ignore
|
|
2840
2861
|
"svelte/internal/disclose-version": () => import("./svelte/internal/disclose-version.js"),
|
|
2841
2862
|
// @ts-ignore
|
|
2842
2863
|
"svelte/internal/client": () => import("./svelte/internal/client.js")
|
|
2843
|
-
},
|
|
2864
|
+
}, d = (p) => p in l ? l[p]() : import(
|
|
2844
2865
|
/* @vite-ignore */
|
|
2845
|
-
|
|
2846
|
-
), { action:
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2866
|
+
p
|
|
2867
|
+
), { action: c } = await r(d), h = concat([
|
|
2868
|
+
header(nil_xit_proto.MessageType.MessageType_FrameLoaded),
|
|
2869
|
+
nil_xit_proto.FrameLoaded.encode({ id: e, tag: n }).finish()
|
|
2870
|
+
]);
|
|
2871
|
+
return t.start(), t.on_connect(() => {
|
|
2872
|
+
const p = concat([
|
|
2873
|
+
header(nil_xit_proto.MessageType.MessageType_FrameSubscribe),
|
|
2874
|
+
nil_xit_proto.FrameLoaded.encode({ id: e, tag: n }).finish()
|
|
2875
|
+
]);
|
|
2876
|
+
t.publish(p);
|
|
2877
|
+
}), service_publish(u, h), (p) => {
|
|
2878
|
+
const m = /* @__PURE__ */ new Map();
|
|
2879
|
+
m.set("nil.xit", create_context(s, o, f));
|
|
2880
|
+
const { destroy: _ } = c(p, m);
|
|
2881
|
+
return {
|
|
2852
2882
|
destroy: () => {
|
|
2853
|
-
|
|
2883
|
+
t.stop(), _();
|
|
2854
2884
|
}
|
|
2855
2885
|
};
|
|
2856
2886
|
};
|