@ikonai/sdk-ui 1.0.29 → 1.0.31
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/{ui-worker-CVAjgDT2.js → ui-worker-CgUxgLaW.js} +82 -77
- package/index.js +138 -133
- package/package.json +1 -1
|
@@ -13,17 +13,17 @@ function et(t) {
|
|
|
13
13
|
const r = e.getUint32(0, !0), n = e.getUint32(4, !0), i = e.getUint32(8, !0), o = e.getUint32(12, !0), a = e.getUint32(16, !0), c = e.getUint32(20, !0), l = e.getUint8(24), I = e.getUint8(25), E = e.getUint8(26);
|
|
14
14
|
if (27 + c * 4 > s.length)
|
|
15
15
|
throw new Error("Protocol header exceeds payload length");
|
|
16
|
-
const
|
|
17
|
-
let
|
|
16
|
+
const A = [];
|
|
17
|
+
let u = 27;
|
|
18
18
|
for (let y = 0; y < c; y++)
|
|
19
|
-
|
|
19
|
+
A.push(e.getUint32(u, !0)), u += 4;
|
|
20
20
|
return {
|
|
21
21
|
length: r,
|
|
22
22
|
opcode: n,
|
|
23
23
|
senderId: i,
|
|
24
24
|
trackId: o,
|
|
25
25
|
sequenceId: a,
|
|
26
|
-
targetIds:
|
|
26
|
+
targetIds: A,
|
|
27
27
|
payloadVersion: l,
|
|
28
28
|
payloadType: I,
|
|
29
29
|
flags: E
|
|
@@ -97,7 +97,7 @@ class O {
|
|
|
97
97
|
return new ae(s, r, i);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
class
|
|
100
|
+
class U {
|
|
101
101
|
constructor(s, e) {
|
|
102
102
|
this.type = s, this.payload = e;
|
|
103
103
|
}
|
|
@@ -190,7 +190,7 @@ class R {
|
|
|
190
190
|
throw new Error(`Teleport value has type ${p[this.type]}, expected ${p[s]}`);
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
|
-
class ae extends
|
|
193
|
+
class ae extends U {
|
|
194
194
|
constructor(s, e, r) {
|
|
195
195
|
super(e, r), this.fieldId = s;
|
|
196
196
|
}
|
|
@@ -266,7 +266,7 @@ class st {
|
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
|
-
class V extends
|
|
269
|
+
class V extends U {
|
|
270
270
|
constructor(s, e) {
|
|
271
271
|
super(s, e);
|
|
272
272
|
}
|
|
@@ -304,13 +304,13 @@ class rt {
|
|
|
304
304
|
if (s >= 0) {
|
|
305
305
|
d(this.payload, this.offset, s);
|
|
306
306
|
const e = this.payload.subarray(this.offset, this.offset + s);
|
|
307
|
-
return this.offset += s, new
|
|
307
|
+
return this.offset += s, new U(this.keyType, e);
|
|
308
308
|
}
|
|
309
309
|
if (this.keyType === 12 || this.keyType === 13) {
|
|
310
310
|
const e = { offset: this.offset }, r = w(this.payload, e, "DictMalformed");
|
|
311
311
|
d(this.payload, e.offset, r);
|
|
312
312
|
const n = this.payload.subarray(e.offset, e.offset + r);
|
|
313
|
-
return this.offset = e.offset + r, new
|
|
313
|
+
return this.offset = e.offset + r, new U(this.keyType, n);
|
|
314
314
|
}
|
|
315
315
|
throw new Error("Unsupported dictionary key type");
|
|
316
316
|
}
|
|
@@ -321,21 +321,21 @@ class rt {
|
|
|
321
321
|
const s = { offset: this.offset }, e = w(this.payload, s, "DictMalformed");
|
|
322
322
|
d(this.payload, s.offset, e);
|
|
323
323
|
const r = this.payload.subarray(s.offset, s.offset + e);
|
|
324
|
-
return this.offset = s.offset + e, new
|
|
324
|
+
return this.offset = s.offset + e, new U(this.valueType, r);
|
|
325
325
|
}
|
|
326
326
|
case 11: {
|
|
327
327
|
const s = { offset: this.offset }, e = w(this.payload, s, "DictMalformed");
|
|
328
328
|
d(this.payload, s.offset, e);
|
|
329
329
|
const r = this.payload.subarray(s.offset, s.offset + e);
|
|
330
|
-
return this.offset = s.offset + e, new
|
|
330
|
+
return this.offset = s.offset + e, new U(11, r);
|
|
331
331
|
}
|
|
332
332
|
case 9: {
|
|
333
333
|
const s = nt(this.payload, this.offset), e = this.payload.subarray(this.offset, this.offset + s);
|
|
334
|
-
return this.offset += s, new
|
|
334
|
+
return this.offset += s, new U(9, e);
|
|
335
335
|
}
|
|
336
336
|
case 10: {
|
|
337
337
|
const s = it(this.payload, this.offset), e = this.payload.subarray(this.offset, this.offset + s);
|
|
338
|
-
return this.offset += s, new
|
|
338
|
+
return this.offset += s, new U(10, e);
|
|
339
339
|
}
|
|
340
340
|
case 3:
|
|
341
341
|
case 5:
|
|
@@ -349,7 +349,7 @@ class rt {
|
|
|
349
349
|
const s = v(this.valueType);
|
|
350
350
|
d(this.payload, this.offset, s);
|
|
351
351
|
const e = this.payload.subarray(this.offset, this.offset + s);
|
|
352
|
-
return this.offset += s, new
|
|
352
|
+
return this.offset += s, new U(this.valueType, e);
|
|
353
353
|
}
|
|
354
354
|
default:
|
|
355
355
|
throw new Error(`Unsupported dictionary value type ${p[this.valueType]}`);
|
|
@@ -2126,10 +2126,10 @@ class fi {
|
|
|
2126
2126
|
const E = J(I, e.changes);
|
|
2127
2127
|
E !== I ? (o.baseline = E, c = !0, this.viewsDirty = !0) : o.baseline = E, o.baselineVersion = n.optimisticReconcile?.baseVersion ?? e.version;
|
|
2128
2128
|
let _ = o.baseline ?? E;
|
|
2129
|
-
const
|
|
2130
|
-
for (const
|
|
2131
|
-
const y = J(_,
|
|
2132
|
-
y !== _ && (c = !0, this.viewsDirty = !0), _ = y,
|
|
2129
|
+
const A = this.getSortedPatches(o);
|
|
2130
|
+
for (const u of A) {
|
|
2131
|
+
const y = J(_, u.changes);
|
|
2132
|
+
y !== _ && (c = !0, this.viewsDirty = !0), _ = y, u.baseVersion = o.baselineVersion;
|
|
2133
2133
|
}
|
|
2134
2134
|
o.composite !== _ && (o.composite = _, c = !0, this.viewsDirty = !0), l && _ ? j(l, _, this.changedNodeIds) : _ && b(_, this.changedNodeIds), o.version = e.version;
|
|
2135
2135
|
}
|
|
@@ -2158,25 +2158,25 @@ class fi {
|
|
|
2158
2158
|
for (const _ of s.deleteViews)
|
|
2159
2159
|
a().delete(_) && (r = !0, this.structureChanged = !0);
|
|
2160
2160
|
if (s.upsertViews && s.upsertViews.length > 0)
|
|
2161
|
-
for (const [_,
|
|
2162
|
-
const
|
|
2163
|
-
y !==
|
|
2161
|
+
for (const [_, A] of s.upsertViews) {
|
|
2162
|
+
const u = a(), y = u.get(_);
|
|
2163
|
+
y !== A && (u.set(_, A), r = !0, y ? j(y, A, this.changedNodeIds) : (b(A, this.changedNodeIds), this.structureChanged = !0));
|
|
2164
2164
|
}
|
|
2165
2165
|
if (s.deletePayloads && s.deletePayloads.length > 0)
|
|
2166
2166
|
for (const _ of s.deletePayloads)
|
|
2167
2167
|
c().delete(_) && (r = !0);
|
|
2168
2168
|
if (s.upsertPayloads && s.upsertPayloads.length > 0)
|
|
2169
|
-
for (const [_,
|
|
2170
|
-
const
|
|
2171
|
-
|
|
2169
|
+
for (const [_, A] of s.upsertPayloads) {
|
|
2170
|
+
const u = c();
|
|
2171
|
+
u.get(_) !== A && (u.set(_, A), r = !0);
|
|
2172
2172
|
}
|
|
2173
2173
|
if (s.deleteOptimisticPatchesForViews && s.deleteOptimisticPatchesForViews.length > 0)
|
|
2174
2174
|
for (const _ of s.deleteOptimisticPatchesForViews)
|
|
2175
2175
|
l().delete(_) && (r = !0);
|
|
2176
2176
|
if (s.upsertOptimisticPatches && s.upsertOptimisticPatches.length > 0)
|
|
2177
|
-
for (const [_,
|
|
2178
|
-
const
|
|
2179
|
-
Ni(y,
|
|
2177
|
+
for (const [_, A] of s.upsertOptimisticPatches) {
|
|
2178
|
+
const u = l(), y = u.get(_);
|
|
2179
|
+
Ni(y, A) || (u.set(_, A), r = !0);
|
|
2180
2180
|
}
|
|
2181
2181
|
const I = s.rootViewId ?? this.snapshot.rootViewId;
|
|
2182
2182
|
I !== this.snapshot.rootViewId && (r = !0, this.structureChanged = !0);
|
|
@@ -2392,14 +2392,14 @@ function Xt(t, s, e) {
|
|
|
2392
2392
|
let o = !1, a = n.props;
|
|
2393
2393
|
if (r?.changedProps && r.changedProps.size > 0)
|
|
2394
2394
|
for (const [f, S] of r.changedProps.entries()) {
|
|
2395
|
-
const
|
|
2395
|
+
const h = a[f];
|
|
2396
2396
|
if (S === void 0)
|
|
2397
|
-
(
|
|
2397
|
+
(h !== void 0 || f in a) && (o || (a = G(a), o = !0), delete a[f]);
|
|
2398
2398
|
else if (tt(S)) {
|
|
2399
|
-
const
|
|
2400
|
-
M(
|
|
2399
|
+
const N = G(S);
|
|
2400
|
+
M(N, h) || (o || (a = G(a), o = !0), a[f] = N);
|
|
2401
2401
|
} else
|
|
2402
|
-
M(S,
|
|
2402
|
+
M(S, h) || (o || (a = G(a), o = !0), a[f] = S);
|
|
2403
2403
|
}
|
|
2404
2404
|
let c = !1, l = n.styleIds;
|
|
2405
2405
|
r?.styleIds !== void 0 && (zt(n.styleIds, r.styleIds) || (l = r.styleIds, c = !0));
|
|
@@ -2408,42 +2408,47 @@ function Xt(t, s, e) {
|
|
|
2408
2408
|
if (r?.removals && r.removals.length > 0 || r?.moves && r.moves.length > 0 || r?.inserts && r.inserts.length > 0) {
|
|
2409
2409
|
const f = E.slice();
|
|
2410
2410
|
if (r?.removals && r.removals.length > 0) {
|
|
2411
|
-
const S = [...r.removals].sort((
|
|
2412
|
-
for (const
|
|
2413
|
-
|
|
2411
|
+
const S = [...r.removals].sort((h, N) => N.index - h.index);
|
|
2412
|
+
for (const h of S)
|
|
2413
|
+
if (h.index >= 0 && h.index < f.length && f[h.index].id === h.nodeId)
|
|
2414
|
+
f.splice(h.index, 1);
|
|
2415
|
+
else {
|
|
2416
|
+
const N = f.findIndex((R) => R.id === h.nodeId);
|
|
2417
|
+
N >= 0 && f.splice(N, 1);
|
|
2418
|
+
}
|
|
2414
2419
|
_ = !0;
|
|
2415
2420
|
}
|
|
2416
2421
|
if (r?.moves && r.moves.length > 0) {
|
|
2417
|
-
const S = [...r.moves].sort((
|
|
2418
|
-
for (const
|
|
2419
|
-
const
|
|
2420
|
-
|
|
2421
|
-
}
|
|
2422
|
-
for (const
|
|
2423
|
-
const
|
|
2424
|
-
if (
|
|
2425
|
-
const z = Math.min(
|
|
2426
|
-
f.splice(z, 0,
|
|
2422
|
+
const S = [...r.moves].sort((N, R) => N.toIndex - R.toIndex), h = /* @__PURE__ */ new Map();
|
|
2423
|
+
for (const N of S) {
|
|
2424
|
+
const R = f.findIndex((z) => z.id === N.nodeId);
|
|
2425
|
+
R >= 0 && (h.set(N.nodeId, f[R]), f.splice(R, 1));
|
|
2426
|
+
}
|
|
2427
|
+
for (const N of S) {
|
|
2428
|
+
const R = h.get(N.nodeId);
|
|
2429
|
+
if (R) {
|
|
2430
|
+
const z = Math.min(N.toIndex, f.length);
|
|
2431
|
+
f.splice(z, 0, R);
|
|
2427
2432
|
}
|
|
2428
2433
|
}
|
|
2429
2434
|
_ = !0;
|
|
2430
2435
|
}
|
|
2431
2436
|
if (r?.inserts && r.inserts.length > 0) {
|
|
2432
|
-
const S = [...r.inserts].sort((
|
|
2433
|
-
for (const
|
|
2434
|
-
const
|
|
2435
|
-
f.splice(
|
|
2437
|
+
const S = [...r.inserts].sort((h, N) => h.index - N.index);
|
|
2438
|
+
for (const h of S) {
|
|
2439
|
+
const N = Math.min(h.index, f.length);
|
|
2440
|
+
f.splice(N, 0, h.node);
|
|
2436
2441
|
}
|
|
2437
2442
|
_ = !0;
|
|
2438
2443
|
}
|
|
2439
2444
|
E = f;
|
|
2440
2445
|
}
|
|
2441
|
-
let
|
|
2446
|
+
let u;
|
|
2442
2447
|
for (let f = 0; f < E.length; f++) {
|
|
2443
|
-
const S = E[f],
|
|
2444
|
-
|
|
2448
|
+
const S = E[f], h = Xt(S, s);
|
|
2449
|
+
h !== S && (u || (u = E.slice()), u[f] = h);
|
|
2445
2450
|
}
|
|
2446
|
-
return
|
|
2451
|
+
return u && (E = u, _ = !0), i || o || c || _ ? !o && !_ && !c ? n : {
|
|
2447
2452
|
id: t.id,
|
|
2448
2453
|
type: t.type,
|
|
2449
2454
|
props: o ? a : n.props,
|
|
@@ -2475,9 +2480,9 @@ function jt(t, s, e, r) {
|
|
|
2475
2480
|
for (const l of i)
|
|
2476
2481
|
a.set(l.id, l);
|
|
2477
2482
|
let c = !1;
|
|
2478
|
-
for (
|
|
2479
|
-
const I = a.get(
|
|
2480
|
-
|
|
2483
|
+
for (let l = 0; l < o.length; l++) {
|
|
2484
|
+
const I = o[l], E = a.get(I.id);
|
|
2485
|
+
E ? (jt(E, I, e, r + 1), !c && l < i.length && i[l].id !== I.id && (c = !0)) : (b(I, e), c = !0);
|
|
2481
2486
|
}
|
|
2482
2487
|
(i.length !== o.length || c) && e.add(s.id);
|
|
2483
2488
|
}
|
|
@@ -2545,8 +2550,8 @@ function Jt(t, s, e) {
|
|
|
2545
2550
|
E ? E.push(I) : l.set(I.propertyName, [I]);
|
|
2546
2551
|
}
|
|
2547
2552
|
for (const [I, E] of l.entries()) {
|
|
2548
|
-
const _ = i[I],
|
|
2549
|
-
n || (i = G(i), n = !0), i[I] =
|
|
2553
|
+
const _ = i[I], u = Ai(typeof _ == "string" ? _ : "", E);
|
|
2554
|
+
n || (i = G(i), n = !0), i[I] = u;
|
|
2550
2555
|
}
|
|
2551
2556
|
}
|
|
2552
2557
|
let o = !1;
|
|
@@ -2614,8 +2619,8 @@ function M(t, s) {
|
|
|
2614
2619
|
}
|
|
2615
2620
|
return !1;
|
|
2616
2621
|
}
|
|
2617
|
-
const Ci = 16, yi = 50,
|
|
2618
|
-
let qt = Ci, Qt = yi, B = [], x = null, H = null,
|
|
2622
|
+
const Ci = 16, yi = 50, L = new hi(), k = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new Map();
|
|
2623
|
+
let qt = Ci, Qt = yi, B = [], x = null, H = null, m = 0, W = 0;
|
|
2619
2624
|
const F = /* @__PURE__ */ new Map();
|
|
2620
2625
|
function wi() {
|
|
2621
2626
|
return typeof performance < "u" ? performance.now() : Date.now();
|
|
@@ -2700,7 +2705,7 @@ function P(t) {
|
|
|
2700
2705
|
}
|
|
2701
2706
|
function It() {
|
|
2702
2707
|
if (x && (clearTimeout(x), x = null), H && (clearTimeout(H), H = null), B.length === 0 && F.size === 0) {
|
|
2703
|
-
|
|
2708
|
+
m = 0, W = 0;
|
|
2704
2709
|
return;
|
|
2705
2710
|
}
|
|
2706
2711
|
const t = [];
|
|
@@ -2711,9 +2716,9 @@ function It() {
|
|
|
2711
2716
|
createdAtMs: wi(),
|
|
2712
2717
|
ops: B,
|
|
2713
2718
|
...t.length > 0 ? { acks: t } : {},
|
|
2714
|
-
stats: { uiMessagesConsumed:
|
|
2719
|
+
stats: { uiMessagesConsumed: m, bytesConsumed: W }
|
|
2715
2720
|
};
|
|
2716
|
-
B = [],
|
|
2721
|
+
B = [], m = 0, W = 0, F.clear(), self.postMessage(s);
|
|
2717
2722
|
}
|
|
2718
2723
|
function te(t) {
|
|
2719
2724
|
return `${t.senderId}_${t.trackId}`;
|
|
@@ -2724,16 +2729,16 @@ async function Li(t) {
|
|
|
2724
2729
|
const n = r.StreamId;
|
|
2725
2730
|
e.add(n);
|
|
2726
2731
|
const i = r.Info?.Category;
|
|
2727
|
-
|
|
2732
|
+
L.getSnapshot(n)?.category !== i && (L.setCategory(n, i), P({ type: "SetStreamCategory", streamId: n, category: i }));
|
|
2728
2733
|
}
|
|
2729
|
-
for (const r of
|
|
2730
|
-
e.has(r.streamId) || (
|
|
2734
|
+
for (const r of L.getSnapshots())
|
|
2735
|
+
e.has(r.streamId) || (L.remove(r.streamId), Y.delete(r.streamId), P({ type: "RemoveStream", streamId: r.streamId }));
|
|
2731
2736
|
}
|
|
2732
2737
|
async function Oi(t) {
|
|
2733
2738
|
const s = et(t), e = te(s), r = await ti(t), n = Ei(r), i = F.get(s.trackId);
|
|
2734
|
-
if ((i === void 0 || n.snapshot.version > i.version) && (F.set(s.trackId, { version: n.snapshot.version, senderId: s.senderId }), Zt()), !
|
|
2739
|
+
if ((i === void 0 || n.snapshot.version > i.version) && (F.set(s.trackId, { version: n.snapshot.version, senderId: s.senderId }), Zt()), !L.apply(e, n))
|
|
2735
2740
|
return;
|
|
2736
|
-
const a =
|
|
2741
|
+
const a = L.getSnapshot(e);
|
|
2737
2742
|
if (!a)
|
|
2738
2743
|
return;
|
|
2739
2744
|
const c = Y.get(e);
|
|
@@ -2766,7 +2771,7 @@ async function Pi(t) {
|
|
|
2766
2771
|
}
|
|
2767
2772
|
function bi(t) {
|
|
2768
2773
|
const s = et(t), e = te(s);
|
|
2769
|
-
|
|
2774
|
+
L.clear(e), Y.delete(e), P({ type: "ClearStream", streamId: e });
|
|
2770
2775
|
}
|
|
2771
2776
|
async function Fi(t) {
|
|
2772
2777
|
const s = await Kn(t);
|
|
@@ -2780,7 +2785,7 @@ async function pi(t) {
|
|
|
2780
2785
|
const e = s;
|
|
2781
2786
|
switch (se(e)) {
|
|
2782
2787
|
case g.CORE_GLOBAL_STATE:
|
|
2783
|
-
await Li(e),
|
|
2788
|
+
await Li(e), m++;
|
|
2784
2789
|
return;
|
|
2785
2790
|
case g.UI_UPDATE:
|
|
2786
2791
|
try {
|
|
@@ -2788,20 +2793,20 @@ async function pi(t) {
|
|
|
2788
2793
|
} catch (n) {
|
|
2789
2794
|
return n instanceof D, void 0;
|
|
2790
2795
|
} finally {
|
|
2791
|
-
|
|
2796
|
+
m++;
|
|
2792
2797
|
}
|
|
2793
2798
|
return;
|
|
2794
2799
|
case g.UI_STYLES:
|
|
2795
|
-
await gi(e),
|
|
2800
|
+
await gi(e), m++;
|
|
2796
2801
|
return;
|
|
2797
2802
|
case g.UI_STYLES_BATCH:
|
|
2798
|
-
await Pi(e),
|
|
2803
|
+
await Pi(e), m++;
|
|
2799
2804
|
return;
|
|
2800
2805
|
case g.UI_STYLES_DELETE:
|
|
2801
|
-
await Fi(e),
|
|
2806
|
+
await Fi(e), m++;
|
|
2802
2807
|
return;
|
|
2803
2808
|
case g.ACTION_UI_CLEAR_STREAM:
|
|
2804
|
-
bi(e),
|
|
2809
|
+
bi(e), m++;
|
|
2805
2810
|
return;
|
|
2806
2811
|
default:
|
|
2807
2812
|
return;
|
|
@@ -2815,8 +2820,8 @@ self.addEventListener("message", (t) => {
|
|
|
2815
2820
|
}
|
|
2816
2821
|
if (s.type === "clear") {
|
|
2817
2822
|
B = [], Y.clear(), F.clear(), k.clear();
|
|
2818
|
-
for (const e of
|
|
2819
|
-
|
|
2823
|
+
for (const e of L.getSnapshots())
|
|
2824
|
+
L.remove(e.streamId);
|
|
2820
2825
|
return;
|
|
2821
2826
|
}
|
|
2822
2827
|
s.type === "protocol" && pi(s.message).catch(() => {
|
package/index.js
CHANGED
|
@@ -6,13 +6,13 @@ function te(e) {
|
|
|
6
6
|
const t = G(e), s = new DataView(t.buffer, t.byteOffset, t.byteLength);
|
|
7
7
|
if (t.length < P)
|
|
8
8
|
throw new Error("Protocol payload too short");
|
|
9
|
-
const r = s.getUint32(0, !0), i = s.getUint32(4, !0), n = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0), l = s.getUint32(20, !0), h = s.getUint8(24), I = s.getUint8(25),
|
|
9
|
+
const r = s.getUint32(0, !0), i = s.getUint32(4, !0), n = s.getUint32(8, !0), o = s.getUint32(12, !0), a = s.getUint32(16, !0), l = s.getUint32(20, !0), h = s.getUint8(24), I = s.getUint8(25), c = s.getUint8(26);
|
|
10
10
|
if (P + l * 4 > t.length)
|
|
11
11
|
throw new Error("Protocol header exceeds payload length");
|
|
12
12
|
const u = [];
|
|
13
|
-
let
|
|
14
|
-
for (let
|
|
15
|
-
u.push(s.getUint32(
|
|
13
|
+
let f = P;
|
|
14
|
+
for (let S = 0; S < l; S++)
|
|
15
|
+
u.push(s.getUint32(f, !0)), f += 4;
|
|
16
16
|
return {
|
|
17
17
|
length: r,
|
|
18
18
|
opcode: i,
|
|
@@ -22,7 +22,7 @@ function te(e) {
|
|
|
22
22
|
targetIds: u,
|
|
23
23
|
payloadVersion: h,
|
|
24
24
|
payloadType: I,
|
|
25
|
-
flags:
|
|
25
|
+
flags: c
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
async function M(e, t, s) {
|
|
@@ -36,12 +36,12 @@ async function M(e, t, s) {
|
|
|
36
36
|
return (i.flags & Zt.Compressed) !== 0 && (o = await se(o)), o;
|
|
37
37
|
}
|
|
38
38
|
function ee(e, t, s, r, i) {
|
|
39
|
-
const n = i?.trackId ?? 0, o = i?.sequenceId ?? 0, a = i?.flags ?? 0, l = i?.targetIds ?? [], h = i?.payloadType ?? 8, I = P + l.length * 4,
|
|
40
|
-
u.setUint32(0,
|
|
41
|
-
let
|
|
42
|
-
for (let
|
|
43
|
-
u.setUint32(
|
|
44
|
-
return
|
|
39
|
+
const n = i?.trackId ?? 0, o = i?.sequenceId ?? 0, a = i?.flags ?? 0, l = i?.targetIds ?? [], h = i?.payloadType ?? 8, I = P + l.length * 4, c = I + t.length, E = new Uint8Array(c), u = new DataView(E.buffer);
|
|
40
|
+
u.setUint32(0, c, !0), u.setUint32(4, e >>> 0, !0), u.setUint32(8, r >>> 0, !0), u.setUint32(12, n >>> 0, !0), u.setUint32(16, o >>> 0, !0), u.setUint32(20, l.length >>> 0, !0), u.setUint8(24, s & 255), u.setUint8(25, h & 255), u.setUint8(26, a & 255);
|
|
41
|
+
let f = P;
|
|
42
|
+
for (let S = 0; S < l.length; S++)
|
|
43
|
+
u.setUint32(f, l[S] >>> 0, !0), f += 4;
|
|
44
|
+
return E.set(t, I), E;
|
|
45
45
|
}
|
|
46
46
|
async function se(e) {
|
|
47
47
|
if (typeof DecompressionStream > "u")
|
|
@@ -494,7 +494,7 @@ class O {
|
|
|
494
494
|
return new ne(t, r, n);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
class
|
|
497
|
+
class g {
|
|
498
498
|
constructor(t, s) {
|
|
499
499
|
this.type = t, this.payload = s;
|
|
500
500
|
}
|
|
@@ -587,7 +587,7 @@ class L {
|
|
|
587
587
|
throw new Error(`Teleport value has type ${U[this.type]}, expected ${U[t]}`);
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
|
-
class ne extends
|
|
590
|
+
class ne extends g {
|
|
591
591
|
constructor(t, s, r) {
|
|
592
592
|
super(s, r), this.fieldId = t;
|
|
593
593
|
}
|
|
@@ -663,7 +663,7 @@ class Z {
|
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
665
|
}
|
|
666
|
-
class V extends
|
|
666
|
+
class V extends g {
|
|
667
667
|
constructor(t, s) {
|
|
668
668
|
super(t, s);
|
|
669
669
|
}
|
|
@@ -701,13 +701,13 @@ class tt {
|
|
|
701
701
|
if (t >= 0) {
|
|
702
702
|
N(this.payload, this.offset, t);
|
|
703
703
|
const s = this.payload.subarray(this.offset, this.offset + t);
|
|
704
|
-
return this.offset += t, new
|
|
704
|
+
return this.offset += t, new g(this.keyType, s);
|
|
705
705
|
}
|
|
706
706
|
if (this.keyType === 12 || this.keyType === 13) {
|
|
707
707
|
const s = { offset: this.offset }, r = C(this.payload, s, "DictMalformed");
|
|
708
708
|
N(this.payload, s.offset, r);
|
|
709
709
|
const i = this.payload.subarray(s.offset, s.offset + r);
|
|
710
|
-
return this.offset = s.offset + r, new
|
|
710
|
+
return this.offset = s.offset + r, new g(this.keyType, i);
|
|
711
711
|
}
|
|
712
712
|
throw new Error("Unsupported dictionary key type");
|
|
713
713
|
}
|
|
@@ -718,21 +718,21 @@ class tt {
|
|
|
718
718
|
const t = { offset: this.offset }, s = C(this.payload, t, "DictMalformed");
|
|
719
719
|
N(this.payload, t.offset, s);
|
|
720
720
|
const r = this.payload.subarray(t.offset, t.offset + s);
|
|
721
|
-
return this.offset = t.offset + s, new
|
|
721
|
+
return this.offset = t.offset + s, new g(this.valueType, r);
|
|
722
722
|
}
|
|
723
723
|
case 11: {
|
|
724
724
|
const t = { offset: this.offset }, s = C(this.payload, t, "DictMalformed");
|
|
725
725
|
N(this.payload, t.offset, s);
|
|
726
726
|
const r = this.payload.subarray(t.offset, t.offset + s);
|
|
727
|
-
return this.offset = t.offset + s, new
|
|
727
|
+
return this.offset = t.offset + s, new g(11, r);
|
|
728
728
|
}
|
|
729
729
|
case 9: {
|
|
730
730
|
const t = st(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + t);
|
|
731
|
-
return this.offset += t, new
|
|
731
|
+
return this.offset += t, new g(9, s);
|
|
732
732
|
}
|
|
733
733
|
case 10: {
|
|
734
734
|
const t = rt(this.payload, this.offset), s = this.payload.subarray(this.offset, this.offset + t);
|
|
735
|
-
return this.offset += t, new
|
|
735
|
+
return this.offset += t, new g(10, s);
|
|
736
736
|
}
|
|
737
737
|
case 3:
|
|
738
738
|
case 5:
|
|
@@ -746,7 +746,7 @@ class tt {
|
|
|
746
746
|
const t = F(this.valueType);
|
|
747
747
|
N(this.payload, this.offset, t);
|
|
748
748
|
const s = this.payload.subarray(this.offset, this.offset + t);
|
|
749
|
-
return this.offset += t, new
|
|
749
|
+
return this.offset += t, new g(this.valueType, s);
|
|
750
750
|
}
|
|
751
751
|
default:
|
|
752
752
|
throw new Error(`Unsupported dictionary value type ${U[this.valueType]}`);
|
|
@@ -995,7 +995,7 @@ function ot(e) {
|
|
|
995
995
|
function G(e) {
|
|
996
996
|
return e instanceof Uint8Array ? e : new Uint8Array(e);
|
|
997
997
|
}
|
|
998
|
-
var ht = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Opus = 1] = "Opus", e[e.Mp3 = 2] = "Mp3", e[e.RawPcm16 = 3] = "RawPcm16", e))(ht || {}), ct = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MobileWeb = 1] = "MobileWeb", e[e.MobileApp = 2] = "MobileApp", e[e.DesktopWeb = 3] = "DesktopWeb", e[e.DesktopApp = 4] = "DesktopApp", e))(ct || {}), Et = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Backend = 2] = "Backend", e[e.Server = 4] = "Server", e[e.Plugin = 8] = "Plugin", e[e.Browser = 16] = "Browser", e))(Et || {}), ut = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MessagePack = 1] = "MessagePack", e[e.MemoryPack = 2] = "MemoryPack", e[e.Json = 4] = "Json", e[e.Teleport = 8] = "Teleport", e[e.All = 15] = "All", e))(ut || {}), _t = /* @__PURE__ */ ((e) => (e[e.Face = 0] = "Face", e[e.Hands = 1] = "Hands", e[e.Pose = 2] = "Pose", e[e.All = 3] = "All", e))(_t || {}), ft = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Machine = 1] = "Machine", e[e.Human = 2] = "Human", e))(ft || {}), dt = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.H264 = 1] = "H264", e[e.Vp8 = 2] = "Vp8", e[e.Vp9 = 3] = "Vp9", e[e.Av1 = 4] = "Av1", e))(dt || {}), Tt = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.DotNet = 1] = "DotNet", e[e.TypeScript = 2] = "TypeScript", e[e.Cpp = 3] = "Cpp", e))(Tt || {}), yt = /* @__PURE__ */ ((e) => (e[e.Local = 0] = "Local", e[e.Cloud = 1] = "Cloud", e))(yt || {}), St = /* @__PURE__ */ ((e) => (e[e.Bundle = 0] = "Bundle", e[e.GitSource = 1] = "GitSource", e))(St || {}), m = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", e[e.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", e[e.GROUP_CORE = 65536] = "GROUP_CORE", e[e.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", e[e.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", e[e.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", e[e.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", e[e.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", e[e.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", e[e.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", e[e.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", e[e.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", e[e.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", e[e.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", e[e.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", e[e.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", e[e.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", e[e.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", e[e.CORE_SERVER_START = 65552] = "CORE_SERVER_START", e[e.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", e[e.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", e[e.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", e[e.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", e[e.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", e[e.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", e[e.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", e[e.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", e[e.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", e[e.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", e[e.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", e[e.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", e[e.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", e[e.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", e[e.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", e[e.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", e[e.GROUP_EVENTS = 262144] = "GROUP_EVENTS", e[e.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", e[e.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", e[e.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", e[e.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", e[e.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", e[e.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", e[e.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", e[e.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", e[e.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", e[e.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", e[e.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", e[e.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", e[e.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", e[e.ACTION_CALL = 1048577] = "ACTION_CALL", e[e.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", e[e.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", e[e.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", e[e.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", e[e.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", e[e.ACTION_TAP = 1048583] = "ACTION_TAP", e[e.ACTION_PAN = 1048584] = "ACTION_PAN", e[e.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", e[e.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", e[e.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", e[e.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", e[e.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", e[e.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", e[e.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", e[e.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", e[e.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", e[e.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", e[e.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", e[e.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", e[e.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", e[e.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", e[e.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", e[e.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", e[e.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", e[e.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", e[e.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", e[e.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", e[e.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", e[e.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", e[e.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", e[e.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", e[e.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", e[e.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", e[e.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", e[e.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", e[e.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", e[e.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", e[e.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", e[e.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", e[e.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", e[e.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", e[e.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", e[e.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", e[e.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", e[e.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", e[e.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", e[e.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", e[e.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", e[e.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", e[e.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", e[e.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", e[e.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", e[e.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", e[e.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", e[e.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", e[e.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", e[e.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", e[e.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", e[e.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", e[e.ACTION_CALL2 = 1048637] = "ACTION_CALL2", e[e.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", e[e.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", e[e.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", e[e.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", e[e.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", e[e.GROUP_UI = 2097152] = "GROUP_UI", e[e.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", e[e.UI_STREAM_END = 2097154] = "UI_STREAM_END", e[e.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", e[e.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", e[e.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", e[e.UI_SECTION_END = 2097158] = "UI_SECTION_END", e[e.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", e[e.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", e[e.UI_LIST_END = 2097161] = "UI_LIST_END", e[e.UI_TEXT = 2097162] = "UI_TEXT", e[e.UI_HEADER = 2097163] = "UI_HEADER", e[e.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", e[e.UI_BUTTON = 2097165] = "UI_BUTTON", e[e.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", e[e.UI_IMAGE = 2097167] = "UI_IMAGE", e[e.UI_FILE = 2097168] = "UI_FILE", e[e.UI_BADGE = 2097169] = "UI_BADGE", e[e.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", e[e.UI_MAP = 2097171] = "UI_MAP", e[e.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", e[e.UI_ICON = 2097173] = "UI_ICON", e[e.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", e[e.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", e[e.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", e[e.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", e[e.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", e[e.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", e[e.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", e[e.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", e[e.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", e[e.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", e[e.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", e[e.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", e[e.UI_QS = 2097186] = "UI_QS", e[e.UI_ELEMENT = 2097187] = "UI_ELEMENT", e[e.UI_STYLES = 2097188] = "UI_STYLES", e[e.UI_SVG = 2097189] = "UI_SVG", e[e.UI_UPDATE = 2097190] = "UI_UPDATE", e[e.UI_INIT = 2097191] = "UI_INIT", e[e.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", e[e.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", e[e.GROUP_COMMON = 4128768] = "GROUP_COMMON", e[e.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", e[e.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", e[e.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", e[e.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", e[e.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", e[e.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", e[e.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", e[e.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", e[e.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", e[e.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", e[e.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", e[e.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", e[e.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", e[e.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", e[e.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", e[e.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", e[e.GROUP_SCENE = 33554432] = "GROUP_SCENE", e[e.SCENE_MESH = 33554433] = "SCENE_MESH", e[e.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", e[e.GROUP_ALL = 67043328] = "GROUP_ALL", e[e.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", e))(m || {});
|
|
998
|
+
var ht = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Opus = 1] = "Opus", e[e.Mp3 = 2] = "Mp3", e[e.RawPcm16 = 3] = "RawPcm16", e))(ht || {}), ct = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MobileWeb = 1] = "MobileWeb", e[e.MobileApp = 2] = "MobileApp", e[e.DesktopWeb = 3] = "DesktopWeb", e[e.DesktopApp = 4] = "DesktopApp", e))(ct || {}), Et = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Backend = 2] = "Backend", e[e.Server = 4] = "Server", e[e.Plugin = 8] = "Plugin", e[e.Browser = 16] = "Browser", e))(Et || {}), ut = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.MessagePack = 1] = "MessagePack", e[e.MemoryPack = 2] = "MemoryPack", e[e.Json = 4] = "Json", e[e.Teleport = 8] = "Teleport", e[e.All = 15] = "All", e))(ut || {}), _t = /* @__PURE__ */ ((e) => (e[e.Face = 0] = "Face", e[e.Hands = 1] = "Hands", e[e.Pose = 2] = "Pose", e[e.All = 3] = "All", e))(_t || {}), ft = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.Machine = 1] = "Machine", e[e.Human = 2] = "Human", e))(ft || {}), dt = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.H264 = 1] = "H264", e[e.Vp8 = 2] = "Vp8", e[e.Vp9 = 3] = "Vp9", e[e.Av1 = 4] = "Av1", e))(dt || {}), Tt = /* @__PURE__ */ ((e) => (e[e.Unknown = 0] = "Unknown", e[e.DotNet = 1] = "DotNet", e[e.TypeScript = 2] = "TypeScript", e[e.Cpp = 3] = "Cpp", e))(Tt || {}), yt = /* @__PURE__ */ ((e) => (e[e.Local = 0] = "Local", e[e.Cloud = 1] = "Cloud", e))(yt || {}), St = /* @__PURE__ */ ((e) => (e[e.Bundle = 0] = "Bundle", e[e.GitSource = 1] = "GitSource", e))(St || {}), L = /* @__PURE__ */ ((e) => (e[e.NONE = 0] = "NONE", e[e.CONSTANT_GROUP_BITS = 15] = "CONSTANT_GROUP_BITS", e[e.CONSTANT_GROUP_OFFSET = 16] = "CONSTANT_GROUP_OFFSET", e[e.GROUP_CORE = 65536] = "GROUP_CORE", e[e.CORE_AUTH_RESPONSE = 65537] = "CORE_AUTH_RESPONSE", e[e.CORE_AUTH_TICKET = 65538] = "CORE_AUTH_TICKET", e[e.CORE_GLOBAL_STATE = 65539] = "CORE_GLOBAL_STATE", e[e.CORE_ON_SERVER_STATUS_PING = 65540] = "CORE_ON_SERVER_STATUS_PING", e[e.CORE_ON_USER_JOINED = 65541] = "CORE_ON_USER_JOINED", e[e.CORE_ON_USER_LEFT = 65542] = "CORE_ON_USER_LEFT", e[e.CORE_ON_CLIENT_JOINED = 65543] = "CORE_ON_CLIENT_JOINED", e[e.CORE_ON_CLIENT_LEFT = 65544] = "CORE_ON_CLIENT_LEFT", e[e.CORE_ON_SERVER_STARTED = 65545] = "CORE_ON_SERVER_STARTED", e[e.CORE_ON_SERVER_STOPPED = 65546] = "CORE_ON_SERVER_STOPPED", e[e.CORE_ON_SERVER_STOPPING = 65547] = "CORE_ON_SERVER_STOPPING", e[e.CORE_ON_CLIENT_READY = 65548] = "CORE_ON_CLIENT_READY", e[e.CORE_CLIENT_READY = 65549] = "CORE_CLIENT_READY", e[e.CORE_SERVER_INIT = 65550] = "CORE_SERVER_INIT", e[e.CORE_ON_PLUGIN_RELOADED = 65551] = "CORE_ON_PLUGIN_RELOADED", e[e.CORE_SERVER_START = 65552] = "CORE_SERVER_START", e[e.CORE_SERVER_STOP = 65553] = "CORE_SERVER_STOP", e[e.CORE_ON_HOSTED_SERVER_EXIT = 65554] = "CORE_ON_HOSTED_SERVER_EXIT", e[e.CORE_DYNAMIC_CONFIG = 65555] = "CORE_DYNAMIC_CONFIG", e[e.CORE_PROXY_RPC_AUTH_TICKET = 65556] = "CORE_PROXY_RPC_AUTH_TICKET", e[e.CORE_SERVER_INIT2 = 65557] = "CORE_SERVER_INIT2", e[e.CORE_UPDATE_CLIENT_CONTEXT = 65558] = "CORE_UPDATE_CLIENT_CONTEXT", e[e.CORE_BACKGROUND_WORK_ACTIVE = 65559] = "CORE_BACKGROUND_WORK_ACTIVE", e[e.CORE_WEBRTC_OFFER = 65566] = "CORE_WEBRTC_OFFER", e[e.CORE_WEBRTC_ANSWER = 65567] = "CORE_WEBRTC_ANSWER", e[e.CORE_WEBRTC_ICE_CANDIDATE = 65568] = "CORE_WEBRTC_ICE_CANDIDATE", e[e.CORE_WEBRTC_READY = 65569] = "CORE_WEBRTC_READY", e[e.CORE_WEBRTC_AUDIO_SEGMENT = 65570] = "CORE_WEBRTC_AUDIO_SEGMENT", e[e.CORE_WEBRTC_TRACK_MAP = 65571] = "CORE_WEBRTC_TRACK_MAP", e[e.GROUP_KEEPALIVE = 131072] = "GROUP_KEEPALIVE", e[e.KEEPALIVE_REQUEST = 131073] = "KEEPALIVE_REQUEST", e[e.KEEPALIVE_RESPONSE = 131074] = "KEEPALIVE_RESPONSE", e[e.GROUP_EVENTS = 262144] = "GROUP_EVENTS", e[e.EVENTS_PROFILE_UPDATE = 262145] = "EVENTS_PROFILE_UPDATE", e[e.EVENTS_CHANNEL_COMPLETE = 262146] = "EVENTS_CHANNEL_COMPLETE", e[e.EVENTS_SPEECH_PLAYBACK_COMPLETE = 262147] = "EVENTS_SPEECH_PLAYBACK_COMPLETE", e[e.GROUP_ANALYTICS = 524288] = "GROUP_ANALYTICS", e[e.ANALYTICS_LOGS = 524289] = "ANALYTICS_LOGS", e[e.ANALYTICS_EVENTS = 524290] = "ANALYTICS_EVENTS", e[e.ANALYTICS_USAGES = 524291] = "ANALYTICS_USAGES", e[e.ANALYTICS_USAGE = 524292] = "ANALYTICS_USAGE", e[e.ANALYTICS_SPECIAL_LOG = 524293] = "ANALYTICS_SPECIAL_LOG", e[e.ANALYTICS_PROCESSING_UPDATE = 524294] = "ANALYTICS_PROCESSING_UPDATE", e[e.ANALYTICS_REACTIVE_PROCESSING_UPDATE = 524295] = "ANALYTICS_REACTIVE_PROCESSING_UPDATE", e[e.ANALYTICS_IKON_PROXY_SERVER_STATS = 524296] = "ANALYTICS_IKON_PROXY_SERVER_STATS", e[e.GROUP_ACTIONS = 1048576] = "GROUP_ACTIONS", e[e.ACTION_CALL = 1048577] = "ACTION_CALL", e[e.ACTION_ACTIVE = 1048578] = "ACTION_ACTIVE", e[e.ACTION_TEXT_OUTPUT = 1048579] = "ACTION_TEXT_OUTPUT", e[e.ACTION_TEXT_OUTPUT_DELTA = 1048580] = "ACTION_TEXT_OUTPUT_DELTA", e[e.ACTION_TEXT_OUTPUT_DELTA_FULL = 1048581] = "ACTION_TEXT_OUTPUT_DELTA_FULL", e[e.ACTION_SET_STATE = 1048582] = "ACTION_SET_STATE", e[e.ACTION_TAP = 1048583] = "ACTION_TAP", e[e.ACTION_PAN = 1048584] = "ACTION_PAN", e[e.ACTION_ZOOM = 1048585] = "ACTION_ZOOM", e[e.ACTION_FILE_UPLOAD_BEGIN = 1048586] = "ACTION_FILE_UPLOAD_BEGIN", e[e.ACTION_FILE_UPLOAD_DATA = 1048587] = "ACTION_FILE_UPLOAD_DATA", e[e.ACTION_FILE_UPLOAD_ACK = 1048588] = "ACTION_FILE_UPLOAD_ACK", e[e.ACTION_FILE_UPLOAD_END = 1048589] = "ACTION_FILE_UPLOAD_END", e[e.ACTION_FILE_UPLOAD_RESULT = 1048590] = "ACTION_FILE_UPLOAD_RESULT", e[e.ACTION_OPEN_CHANNEL = 1048591] = "ACTION_OPEN_CHANNEL", e[e.ACTION_OPEN_EXTERNAL_URL = 1048592] = "ACTION_OPEN_EXTERNAL_URL", e[e.ACTION_UI_OPEN_VIEW = 1048593] = "ACTION_UI_OPEN_VIEW", e[e.ACTION_UI_CLOSE_VIEW = 1048594] = "ACTION_UI_CLOSE_VIEW", e[e.ACTION_UI_BLOCKING_BEGIN = 1048595] = "ACTION_UI_BLOCKING_BEGIN", e[e.ACTION_UI_BLOCKING_END = 1048596] = "ACTION_UI_BLOCKING_END", e[e.ACTION_UI_UPDATE_TEXT_DELTA = 1048597] = "ACTION_UI_UPDATE_TEXT_DELTA", e[e.ACTION_UI_DELETE_CONTAINER = 1048598] = "ACTION_UI_DELETE_CONTAINER", e[e.ACTION_UPDATE_GFX_SHADER = 1048599] = "ACTION_UPDATE_GFX_SHADER", e[e.ACTION_FUNCTION_REGISTER = 1048600] = "ACTION_FUNCTION_REGISTER", e[e.ACTION_FUNCTION_CALL = 1048601] = "ACTION_FUNCTION_CALL", e[e.ACTION_FUNCTION_RESULT = 1048602] = "ACTION_FUNCTION_RESULT", e[e.ACTION_GENERATE_ANSWER = 1048603] = "ACTION_GENERATE_ANSWER", e[e.ACTION_REGENERATE_ANSWER = 1048604] = "ACTION_REGENERATE_ANSWER", e[e.ACTION_CLEAR_CHAT_MESSAGE_HISTORY = 1048605] = "ACTION_CLEAR_CHAT_MESSAGE_HISTORY", e[e.ACTION_CLEAR_STATE = 1048606] = "ACTION_CLEAR_STATE", e[e.ACTION_RELOAD_CHANNELS = 1048607] = "ACTION_RELOAD_CHANNELS", e[e.ACTION_RELOAD_PROFILE = 1048608] = "ACTION_RELOAD_PROFILE", e[e.ACTION_CLASSIFICATION_RESULT = 1048609] = "ACTION_CLASSIFICATION_RESULT", e[e.ACTION_AUDIO_STOP = 1048610] = "ACTION_AUDIO_STOP", e[e.ACTION_CALL_TEXT = 1048611] = "ACTION_CALL_TEXT", e[e.ACTION_RELOAD_APPLICATION = 1048612] = "ACTION_RELOAD_APPLICATION", e[e.ACTION_CANCEL_GENERATION = 1048613] = "ACTION_CANCEL_GENERATION", e[e.ACTION_UI_SET_CONTAINER_STABLE = 1048614] = "ACTION_UI_SET_CONTAINER_STABLE", e[e.ACTION_SPEECH_RECOGNIZED = 1048615] = "ACTION_SPEECH_RECOGNIZED", e[e.ACTION_CALL_RESULT = 1048616] = "ACTION_CALL_RESULT", e[e.ACTION_RELOAD_PROVIDER = 1048617] = "ACTION_RELOAD_PROVIDER", e[e.ACTION_DOWNLOAD = 1048618] = "ACTION_DOWNLOAD", e[e.ACTION_SCROLL_TO_CONTAINER = 1048619] = "ACTION_SCROLL_TO_CONTAINER", e[e.ACTION_UI_CLEAR_STREAM = 1048620] = "ACTION_UI_CLEAR_STREAM", e[e.ACTION_PLAY_SOUND = 1048621] = "ACTION_PLAY_SOUND", e[e.ACTION_ENTER_FULLSCREEN = 1048622] = "ACTION_ENTER_FULLSCREEN", e[e.ACTION_STOP_SOUND = 1048623] = "ACTION_STOP_SOUND", e[e.ACTION_START_RECORDING = 1048624] = "ACTION_START_RECORDING", e[e.ACTION_STOP_RECORDING = 1048625] = "ACTION_STOP_RECORDING", e[e.ACTION_OPTIMISTIC_CLIENT_CALLS = 1048626] = "ACTION_OPTIMISTIC_CLIENT_CALLS", e[e.ACTION_FUNCTION_ENUMERATION_ITEM = 1048627] = "ACTION_FUNCTION_ENUMERATION_ITEM", e[e.ACTION_FUNCTION_ENUMERATION_END = 1048628] = "ACTION_FUNCTION_ENUMERATION_END", e[e.ACTION_FUNCTION_CANCEL = 1048629] = "ACTION_FUNCTION_CANCEL", e[e.ACTION_FUNCTION_DISPOSE = 1048630] = "ACTION_FUNCTION_DISPOSE", e[e.ACTION_FUNCTION_ERROR = 1048631] = "ACTION_FUNCTION_ERROR", e[e.ACTION_FUNCTION_ACK = 1048632] = "ACTION_FUNCTION_ACK", e[e.ACTION_FUNCTION_AWAITING_APPROVAL = 1048633] = "ACTION_FUNCTION_AWAITING_APPROVAL", e[e.ACTION_FUNCTION_APPROVAL_REQUIRED = 1048634] = "ACTION_FUNCTION_APPROVAL_REQUIRED", e[e.ACTION_FUNCTION_APPROVAL_RESPONSE = 1048635] = "ACTION_FUNCTION_APPROVAL_RESPONSE", e[e.UI_UPDATE_ACK = 1048636] = "UI_UPDATE_ACK", e[e.ACTION_CALL2 = 1048637] = "ACTION_CALL2", e[e.ACTION_FUNCTION_REGISTER_BATCH = 1048638] = "ACTION_FUNCTION_REGISTER_BATCH", e[e.ACTION_TRIGGER_GIT_PULL = 1048639] = "ACTION_TRIGGER_GIT_PULL", e[e.ACTION_FILE_UPLOAD_CALLBACK = 1048640] = "ACTION_FILE_UPLOAD_CALLBACK", e[e.ACTION_CUSTOM_USER_MESSAGE = 1048641] = "ACTION_CUSTOM_USER_MESSAGE", e[e.ACTION_URL_CHANGED = 1048642] = "ACTION_URL_CHANGED", e[e.GROUP_UI = 2097152] = "GROUP_UI", e[e.UI_STREAM_BEGIN = 2097153] = "UI_STREAM_BEGIN", e[e.UI_STREAM_END = 2097154] = "UI_STREAM_END", e[e.UI_CONTAINER_BEGIN = 2097155] = "UI_CONTAINER_BEGIN", e[e.UI_CONTAINER_END = 2097156] = "UI_CONTAINER_END", e[e.UI_SECTION_BEGIN = 2097157] = "UI_SECTION_BEGIN", e[e.UI_SECTION_END = 2097158] = "UI_SECTION_END", e[e.UI_LIST_BEGIN = 2097159] = "UI_LIST_BEGIN", e[e.UI_LIST_ITEM = 2097160] = "UI_LIST_ITEM", e[e.UI_LIST_END = 2097161] = "UI_LIST_END", e[e.UI_TEXT = 2097162] = "UI_TEXT", e[e.UI_HEADER = 2097163] = "UI_HEADER", e[e.UI_SEPARATOR = 2097164] = "UI_SEPARATOR", e[e.UI_BUTTON = 2097165] = "UI_BUTTON", e[e.UI_ICON_BUTTON = 2097166] = "UI_ICON_BUTTON", e[e.UI_IMAGE = 2097167] = "UI_IMAGE", e[e.UI_FILE = 2097168] = "UI_FILE", e[e.UI_BADGE = 2097169] = "UI_BADGE", e[e.UI_CONTENT_LINK = 2097170] = "UI_CONTENT_LINK", e[e.UI_MAP = 2097171] = "UI_MAP", e[e.UI_VEGA_CHART = 2097172] = "UI_VEGA_CHART", e[e.UI_ICON = 2097173] = "UI_ICON", e[e.UI_FILE_UPLOAD_SECTION_BEGIN = 2097174] = "UI_FILE_UPLOAD_SECTION_BEGIN", e[e.UI_FILE_UPLOAD_SECTION_END = 2097175] = "UI_FILE_UPLOAD_SECTION_END", e[e.UI_MATERIAL_SYMBOL = 2097176] = "UI_MATERIAL_SYMBOL", e[e.UI_BUTTON_BEGIN = 2097177] = "UI_BUTTON_BEGIN", e[e.UI_BUTTON_END = 2097178] = "UI_BUTTON_END", e[e.UI_CONTAINER_DELETE = 2097179] = "UI_CONTAINER_DELETE", e[e.UI_INPUT_TEXT = 2097180] = "UI_INPUT_TEXT", e[e.UI_PROGRESS_BAR = 2097181] = "UI_PROGRESS_BAR", e[e.UI_UPDATE_BEGIN = 2097182] = "UI_UPDATE_BEGIN", e[e.UI_UPDATE_END = 2097183] = "UI_UPDATE_END", e[e.UI_AUTOCOMPLETE = 2097184] = "UI_AUTOCOMPLETE", e[e.UI_CHECKBOX = 2097185] = "UI_CHECKBOX", e[e.UI_QS = 2097186] = "UI_QS", e[e.UI_ELEMENT = 2097187] = "UI_ELEMENT", e[e.UI_STYLES = 2097188] = "UI_STYLES", e[e.UI_SVG = 2097189] = "UI_SVG", e[e.UI_UPDATE = 2097190] = "UI_UPDATE", e[e.UI_INIT = 2097191] = "UI_INIT", e[e.UI_STYLES_BATCH = 2097192] = "UI_STYLES_BATCH", e[e.UI_STYLES_DELETE = 2097193] = "UI_STYLES_DELETE", e[e.GROUP_COMMON = 4128768] = "GROUP_COMMON", e[e.GROUP_AUDIO = 4194304] = "GROUP_AUDIO", e[e.AUDIO_STREAM_BEGIN = 4194305] = "AUDIO_STREAM_BEGIN", e[e.AUDIO_STREAM_END = 4194306] = "AUDIO_STREAM_END", e[e.AUDIO_FRAME = 4194307] = "AUDIO_FRAME", e[e.AUDIO_FRAME_VOLUME = 4194308] = "AUDIO_FRAME_VOLUME", e[e.AUDIO_FRAME2 = 4194309] = "AUDIO_FRAME2", e[e.GROUP_VIDEO = 8388608] = "GROUP_VIDEO", e[e.VIDEO_STREAM_BEGIN = 8388609] = "VIDEO_STREAM_BEGIN", e[e.VIDEO_STREAM_END = 8388610] = "VIDEO_STREAM_END", e[e.VIDEO_FRAME = 8388611] = "VIDEO_FRAME", e[e.VIDEO_REQUEST_IDR_FRAME = 8388612] = "VIDEO_REQUEST_IDR_FRAME", e[e.VIDEO_INVALIDATE_FRAME = 8388613] = "VIDEO_INVALIDATE_FRAME", e[e.GROUP_TRACKING = 16777216] = "GROUP_TRACKING", e[e.TRACKING_STREAM_BEGIN = 16777217] = "TRACKING_STREAM_BEGIN", e[e.TRACKING_STREAM_END = 16777218] = "TRACKING_STREAM_END", e[e.TRACKING_FRAME = 16777219] = "TRACKING_FRAME", e[e.GROUP_SCENE = 33554432] = "GROUP_SCENE", e[e.SCENE_MESH = 33554433] = "SCENE_MESH", e[e.SCENE_ARRAY = 33554434] = "SCENE_ARRAY", e[e.GROUP_ALL = 67043328] = "GROUP_ALL", e[e.CONSTANT_GROUP_MASK = 2147418112] = "CONSTANT_GROUP_MASK", e))(L || {});
|
|
999
999
|
const he = 161083277, ce = 265814330, Ee = 1368629611, ue = 2431514951, _e = 2745379226, fe = 3282782683, de = 3284746250, Te = 4101844078;
|
|
1000
1000
|
function At(e) {
|
|
1001
1001
|
const t = {};
|
|
@@ -2184,7 +2184,7 @@ function it(e, t) {
|
|
|
2184
2184
|
}
|
|
2185
2185
|
let l = [];
|
|
2186
2186
|
Array.isArray(n) && (l = n.map(
|
|
2187
|
-
(I,
|
|
2187
|
+
(I, c) => it(I ?? {}, `${t}.children[${c}]`)
|
|
2188
2188
|
));
|
|
2189
2189
|
const h = Yt(o, t, s, !1);
|
|
2190
2190
|
return {
|
|
@@ -2271,24 +2271,24 @@ function hn(e, t) {
|
|
|
2271
2271
|
if (typeof s != "string" || s.length === 0)
|
|
2272
2272
|
throw new Error(`Invalid node change nodeId at ${t}`);
|
|
2273
2273
|
const r = Array.isArray(e.inserts) ? e.inserts.map(
|
|
2274
|
-
(I,
|
|
2274
|
+
(I, c) => an(I ?? {}, `${t}.inserts[${c}]`)
|
|
2275
2275
|
) : void 0, i = Array.isArray(e.moves) ? e.moves.map(
|
|
2276
|
-
(I,
|
|
2276
|
+
(I, c) => ln(I ?? {}, `${t}.moves[${c}]`)
|
|
2277
2277
|
) : void 0, n = Array.isArray(e.removals) ? e.removals.map(
|
|
2278
|
-
(I,
|
|
2278
|
+
(I, c) => In(I ?? {}, `${t}.removals[${c}]`)
|
|
2279
2279
|
) : void 0;
|
|
2280
2280
|
let o;
|
|
2281
2281
|
if (w(e.changedProps)) {
|
|
2282
2282
|
o = /* @__PURE__ */ new Map();
|
|
2283
|
-
for (const [I,
|
|
2284
|
-
if (!w(
|
|
2283
|
+
for (const [I, c] of Object.entries(e.changedProps)) {
|
|
2284
|
+
if (!w(c))
|
|
2285
2285
|
continue;
|
|
2286
|
-
const
|
|
2287
|
-
|
|
2286
|
+
const E = c.New;
|
|
2287
|
+
E === void 0 ? o.set(I, void 0) : w(E) ? o.set(I, Kt(E)) : o.set(I, E);
|
|
2288
2288
|
}
|
|
2289
2289
|
}
|
|
2290
2290
|
const a = Array.isArray(e.textUpdates) ? e.textUpdates.map(
|
|
2291
|
-
(I,
|
|
2291
|
+
(I, c) => on(I ?? {}, `${t}.textUpdates[${c}]`)
|
|
2292
2292
|
) : void 0, l = e.styleIds, h = l !== void 0 ? Yt(l, t, s, !0) : void 0;
|
|
2293
2293
|
return {
|
|
2294
2294
|
nodeId: s,
|
|
@@ -2329,7 +2329,7 @@ function un(e, t, s) {
|
|
|
2329
2329
|
if (typeof r != "string" || r.length === 0)
|
|
2330
2330
|
throw new D("UI diff metadata is missing viewId");
|
|
2331
2331
|
const i = e.map(
|
|
2332
|
-
(
|
|
2332
|
+
(c, E) => hn(c ?? {}, `changes[${E}]`)
|
|
2333
2333
|
), n = t.optimisticActionId === null || typeof t.optimisticActionId == "string" ? t.optimisticActionId : void 0, o = typeof t.isOptimistic == "boolean" ? t.isOptimistic : void 0, a = typeof t.isUpdate == "boolean" ? t.isUpdate : void 0, l = z(t.optimisticPatch), h = J(t.optimisticReconcile), I = {
|
|
2334
2334
|
viewId: r,
|
|
2335
2335
|
...n !== void 0 ? { optimisticActionId: n } : {},
|
|
@@ -2580,30 +2580,30 @@ class Tn {
|
|
|
2580
2580
|
return !1;
|
|
2581
2581
|
const I = j(h, s.changes);
|
|
2582
2582
|
I !== h && (o.composite = I, l = !0, this.viewsDirty = !0, H(h, I, this.changedNodeIds));
|
|
2583
|
-
const
|
|
2584
|
-
id:
|
|
2585
|
-
actionId:
|
|
2586
|
-
ordinal:
|
|
2587
|
-
baseVersion:
|
|
2583
|
+
const c = i.optimisticPatch, E = {
|
|
2584
|
+
id: c.id,
|
|
2585
|
+
actionId: c.actionId,
|
|
2586
|
+
ordinal: c.ordinal,
|
|
2587
|
+
baseVersion: c.baseVersion,
|
|
2588
2588
|
changes: s.changes
|
|
2589
2589
|
};
|
|
2590
|
-
o.patches.set(
|
|
2590
|
+
o.patches.set(E.id, E), this.invalidatePatchCache(o), l = !0, this.patchesDirty = !0, o.version = s.version;
|
|
2591
2591
|
} else {
|
|
2592
2592
|
const I = o.baseline ?? h;
|
|
2593
2593
|
if (!I)
|
|
2594
2594
|
return !1;
|
|
2595
|
-
const
|
|
2596
|
-
|
|
2597
|
-
let
|
|
2595
|
+
const c = j(I, s.changes);
|
|
2596
|
+
c !== I ? (o.baseline = c, l = !0, this.viewsDirty = !0) : o.baseline = c, o.baselineVersion = i.optimisticReconcile?.baseVersion ?? s.version;
|
|
2597
|
+
let E = o.baseline ?? c;
|
|
2598
2598
|
const u = this.getSortedPatches(o);
|
|
2599
|
-
for (const
|
|
2600
|
-
const
|
|
2601
|
-
|
|
2599
|
+
for (const f of u) {
|
|
2600
|
+
const S = j(E, f.changes);
|
|
2601
|
+
S !== E && (l = !0, this.viewsDirty = !0), E = S, f.baseVersion = o.baselineVersion;
|
|
2602
2602
|
}
|
|
2603
|
-
o.composite !==
|
|
2603
|
+
o.composite !== E && (o.composite = E, l = !0, this.viewsDirty = !0), h && E ? H(h, E, this.changedNodeIds) : E && b(E, this.changedNodeIds), o.version = s.version;
|
|
2604
2604
|
}
|
|
2605
|
-
for (const [I,
|
|
2606
|
-
this.payloads.get(I) !==
|
|
2605
|
+
for (const [I, c] of r)
|
|
2606
|
+
this.payloads.get(I) !== c && (this.payloads.set(I, c), l = !0, this.payloadsDirty = !0);
|
|
2607
2607
|
return l ? (this.commitSnapshot(), this.notify(), !0) : (o.version = s.version, !1);
|
|
2608
2608
|
}
|
|
2609
2609
|
replaceFromWire(t) {
|
|
@@ -2624,42 +2624,42 @@ class Tn {
|
|
|
2624
2624
|
let r = !1, i = null, n = null, o = null;
|
|
2625
2625
|
const a = () => (i || (i = new Map(this.snapshot.views)), i), l = () => (n || (n = new Map(this.snapshot.payloads)), n), h = () => (o || (o = new Map(this.snapshot.optimisticPatches)), o);
|
|
2626
2626
|
if (t.deleteViews && t.deleteViews.length > 0)
|
|
2627
|
-
for (const
|
|
2628
|
-
a().delete(
|
|
2627
|
+
for (const E of t.deleteViews)
|
|
2628
|
+
a().delete(E) && (r = !0, this.structureChanged = !0);
|
|
2629
2629
|
if (t.upsertViews && t.upsertViews.length > 0)
|
|
2630
|
-
for (const [
|
|
2631
|
-
const
|
|
2632
|
-
|
|
2630
|
+
for (const [E, u] of t.upsertViews) {
|
|
2631
|
+
const f = a(), S = f.get(E);
|
|
2632
|
+
S !== u && (f.set(E, u), r = !0, S ? H(S, u, this.changedNodeIds) : (b(u, this.changedNodeIds), this.structureChanged = !0));
|
|
2633
2633
|
}
|
|
2634
2634
|
if (t.deletePayloads && t.deletePayloads.length > 0)
|
|
2635
|
-
for (const
|
|
2636
|
-
l().delete(
|
|
2635
|
+
for (const E of t.deletePayloads)
|
|
2636
|
+
l().delete(E) && (r = !0);
|
|
2637
2637
|
if (t.upsertPayloads && t.upsertPayloads.length > 0)
|
|
2638
|
-
for (const [
|
|
2639
|
-
const
|
|
2640
|
-
|
|
2638
|
+
for (const [E, u] of t.upsertPayloads) {
|
|
2639
|
+
const f = l();
|
|
2640
|
+
f.get(E) !== u && (f.set(E, u), r = !0);
|
|
2641
2641
|
}
|
|
2642
2642
|
if (t.deleteOptimisticPatchesForViews && t.deleteOptimisticPatchesForViews.length > 0)
|
|
2643
|
-
for (const
|
|
2644
|
-
h().delete(
|
|
2643
|
+
for (const E of t.deleteOptimisticPatchesForViews)
|
|
2644
|
+
h().delete(E) && (r = !0);
|
|
2645
2645
|
if (t.upsertOptimisticPatches && t.upsertOptimisticPatches.length > 0)
|
|
2646
|
-
for (const [
|
|
2647
|
-
const
|
|
2648
|
-
Nn(
|
|
2646
|
+
for (const [E, u] of t.upsertOptimisticPatches) {
|
|
2647
|
+
const f = h(), S = f.get(E);
|
|
2648
|
+
Nn(S, u) || (f.set(E, u), r = !0);
|
|
2649
2649
|
}
|
|
2650
2650
|
const I = t.rootViewId ?? this.snapshot.rootViewId;
|
|
2651
2651
|
I !== this.snapshot.rootViewId && (r = !0, this.structureChanged = !0);
|
|
2652
|
-
const
|
|
2653
|
-
if (
|
|
2654
|
-
return this.snapshot = { ...this.snapshot, version:
|
|
2655
|
-
for (const
|
|
2656
|
-
this.nodeVersions.set(
|
|
2652
|
+
const c = t.nextVersion;
|
|
2653
|
+
if (c !== this.snapshot.version && (r = !0), !r)
|
|
2654
|
+
return this.snapshot = { ...this.snapshot, version: c }, !1;
|
|
2655
|
+
for (const E of this.changedNodeIds)
|
|
2656
|
+
this.nodeVersions.set(E, (this.nodeVersions.get(E) ?? 0) + 1);
|
|
2657
2657
|
return this.snapshot = {
|
|
2658
2658
|
rootViewId: I,
|
|
2659
2659
|
views: i ?? new Map(this.snapshot.views),
|
|
2660
2660
|
payloads: n ?? new Map(this.snapshot.payloads),
|
|
2661
2661
|
optimisticPatches: o ?? new Map(this.snapshot.optimisticPatches),
|
|
2662
|
-
version:
|
|
2662
|
+
version: c
|
|
2663
2663
|
}, this.notify(), !0;
|
|
2664
2664
|
}
|
|
2665
2665
|
replaceSnapshot(t) {
|
|
@@ -2855,68 +2855,73 @@ function $t(e, t, s) {
|
|
|
2855
2855
|
const r = t.get(e.id);
|
|
2856
2856
|
let i = e, n = !1;
|
|
2857
2857
|
if (r?.textUpdates && r.textUpdates.length > 0) {
|
|
2858
|
-
const
|
|
2859
|
-
i =
|
|
2858
|
+
const _ = Cn(e, r.textUpdates);
|
|
2859
|
+
i = _.node, n = _.changed;
|
|
2860
2860
|
}
|
|
2861
2861
|
let o = !1, a = i.props;
|
|
2862
2862
|
if (r?.changedProps && r.changedProps.size > 0)
|
|
2863
|
-
for (const [
|
|
2864
|
-
const T = a[
|
|
2863
|
+
for (const [_, A] of r.changedProps.entries()) {
|
|
2864
|
+
const T = a[_];
|
|
2865
2865
|
if (A === void 0)
|
|
2866
|
-
(T !== void 0 ||
|
|
2866
|
+
(T !== void 0 || _ in a) && (o || (a = v(a), o = !0), delete a[_]);
|
|
2867
2867
|
else if (q(A)) {
|
|
2868
|
-
const
|
|
2869
|
-
k(
|
|
2868
|
+
const y = v(A);
|
|
2869
|
+
k(y, T) || (o || (a = v(a), o = !0), a[_] = y);
|
|
2870
2870
|
} else
|
|
2871
|
-
k(A, T) || (o || (a = v(a), o = !0), a[
|
|
2871
|
+
k(A, T) || (o || (a = v(a), o = !0), a[_] = A);
|
|
2872
2872
|
}
|
|
2873
2873
|
let l = !1, h = i.styleIds;
|
|
2874
2874
|
r?.styleIds !== void 0 && (zt(i.styleIds, r.styleIds) || (h = r.styleIds, l = !0));
|
|
2875
2875
|
const I = i.children ?? [];
|
|
2876
|
-
let
|
|
2876
|
+
let c = I, E = !1;
|
|
2877
2877
|
if (r?.removals && r.removals.length > 0 || r?.moves && r.moves.length > 0 || r?.inserts && r.inserts.length > 0) {
|
|
2878
|
-
const
|
|
2878
|
+
const _ = c.slice();
|
|
2879
2879
|
if (r?.removals && r.removals.length > 0) {
|
|
2880
|
-
const A = [...r.removals].sort((T,
|
|
2880
|
+
const A = [...r.removals].sort((T, y) => y.index - T.index);
|
|
2881
2881
|
for (const T of A)
|
|
2882
|
-
T.index >= 0 && T.index <
|
|
2883
|
-
|
|
2882
|
+
if (T.index >= 0 && T.index < _.length && _[T.index].id === T.nodeId)
|
|
2883
|
+
_.splice(T.index, 1);
|
|
2884
|
+
else {
|
|
2885
|
+
const y = _.findIndex((R) => R.id === T.nodeId);
|
|
2886
|
+
y >= 0 && _.splice(y, 1);
|
|
2887
|
+
}
|
|
2888
|
+
E = !0;
|
|
2884
2889
|
}
|
|
2885
2890
|
if (r?.moves && r.moves.length > 0) {
|
|
2886
|
-
const A = [...r.moves].sort((
|
|
2887
|
-
for (const
|
|
2888
|
-
const
|
|
2889
|
-
|
|
2890
|
-
}
|
|
2891
|
-
for (const
|
|
2892
|
-
const
|
|
2893
|
-
if (
|
|
2894
|
-
const $ = Math.min(
|
|
2895
|
-
|
|
2891
|
+
const A = [...r.moves].sort((y, R) => y.toIndex - R.toIndex), T = /* @__PURE__ */ new Map();
|
|
2892
|
+
for (const y of A) {
|
|
2893
|
+
const R = _.findIndex(($) => $.id === y.nodeId);
|
|
2894
|
+
R >= 0 && (T.set(y.nodeId, _[R]), _.splice(R, 1));
|
|
2895
|
+
}
|
|
2896
|
+
for (const y of A) {
|
|
2897
|
+
const R = T.get(y.nodeId);
|
|
2898
|
+
if (R) {
|
|
2899
|
+
const $ = Math.min(y.toIndex, _.length);
|
|
2900
|
+
_.splice($, 0, R);
|
|
2896
2901
|
}
|
|
2897
2902
|
}
|
|
2898
|
-
|
|
2903
|
+
E = !0;
|
|
2899
2904
|
}
|
|
2900
2905
|
if (r?.inserts && r.inserts.length > 0) {
|
|
2901
|
-
const A = [...r.inserts].sort((T,
|
|
2906
|
+
const A = [...r.inserts].sort((T, y) => T.index - y.index);
|
|
2902
2907
|
for (const T of A) {
|
|
2903
|
-
const
|
|
2904
|
-
|
|
2908
|
+
const y = Math.min(T.index, _.length);
|
|
2909
|
+
_.splice(y, 0, T.node);
|
|
2905
2910
|
}
|
|
2906
|
-
|
|
2911
|
+
E = !0;
|
|
2907
2912
|
}
|
|
2908
|
-
|
|
2913
|
+
c = _;
|
|
2909
2914
|
}
|
|
2910
|
-
let
|
|
2911
|
-
for (let
|
|
2912
|
-
const A =
|
|
2913
|
-
T !== A && (
|
|
2915
|
+
let f;
|
|
2916
|
+
for (let _ = 0; _ < c.length; _++) {
|
|
2917
|
+
const A = c[_], T = $t(A, t);
|
|
2918
|
+
T !== A && (f || (f = c.slice()), f[_] = T);
|
|
2914
2919
|
}
|
|
2915
|
-
return
|
|
2920
|
+
return f && (c = f, E = !0), n || o || l || E ? !o && !E && !l ? i : {
|
|
2916
2921
|
id: e.id,
|
|
2917
2922
|
type: e.type,
|
|
2918
2923
|
props: o ? a : i.props,
|
|
2919
|
-
children:
|
|
2924
|
+
children: E ? c : I,
|
|
2920
2925
|
styleIds: l ? h : i.styleIds
|
|
2921
2926
|
} : e;
|
|
2922
2927
|
}
|
|
@@ -2944,9 +2949,9 @@ function jt(e, t, s, r) {
|
|
|
2944
2949
|
for (const h of n)
|
|
2945
2950
|
a.set(h.id, h);
|
|
2946
2951
|
let l = !1;
|
|
2947
|
-
for (
|
|
2948
|
-
const I = a.get(
|
|
2949
|
-
|
|
2952
|
+
for (let h = 0; h < o.length; h++) {
|
|
2953
|
+
const I = o[h], c = a.get(I.id);
|
|
2954
|
+
c ? (jt(c, I, s, r + 1), !l && h < n.length && n[h].id !== I.id && (l = !0)) : (b(I, s), l = !0);
|
|
2950
2955
|
}
|
|
2951
2956
|
(n.length !== o.length || l) && s.add(t.id);
|
|
2952
2957
|
}
|
|
@@ -2985,8 +2990,8 @@ function wn(e, t) {
|
|
|
2985
2990
|
for (const n of s) {
|
|
2986
2991
|
const o = at(n.start + i, 0, r.length);
|
|
2987
2992
|
if (n.end == null) {
|
|
2988
|
-
const I = r.slice(o),
|
|
2989
|
-
r = r.slice(0, o) + n.insertedText + I.slice(
|
|
2993
|
+
const I = r.slice(o), c = Un(I, n.insertedText);
|
|
2994
|
+
r = r.slice(0, o) + n.insertedText + I.slice(c), i += n.insertedText.length - c;
|
|
2990
2995
|
continue;
|
|
2991
2996
|
}
|
|
2992
2997
|
const a = n.end + i, l = at(a, o, r.length), h = l - o;
|
|
@@ -3010,12 +3015,12 @@ function Jt(e, t, s) {
|
|
|
3010
3015
|
if (r.length > 0) {
|
|
3011
3016
|
const h = /* @__PURE__ */ new Map();
|
|
3012
3017
|
for (const I of r) {
|
|
3013
|
-
const
|
|
3014
|
-
|
|
3018
|
+
const c = h.get(I.propertyName);
|
|
3019
|
+
c ? c.push(I) : h.set(I.propertyName, [I]);
|
|
3015
3020
|
}
|
|
3016
|
-
for (const [I,
|
|
3017
|
-
const
|
|
3018
|
-
i || (n = v(n), i = !0), n[I] =
|
|
3021
|
+
for (const [I, c] of h.entries()) {
|
|
3022
|
+
const E = n[I], f = wn(typeof E == "string" ? E : "", c);
|
|
3023
|
+
i || (n = v(n), i = !0), n[I] = f;
|
|
3019
3024
|
}
|
|
3020
3025
|
}
|
|
3021
3026
|
let o = !1;
|
|
@@ -3024,8 +3029,8 @@ function Jt(e, t, s) {
|
|
|
3024
3029
|
if (a.length > 0) {
|
|
3025
3030
|
let h;
|
|
3026
3031
|
for (let I = 0; I < a.length; I++) {
|
|
3027
|
-
const
|
|
3028
|
-
|
|
3032
|
+
const c = a[I], E = Jt(c, t);
|
|
3033
|
+
E.changed && (h || (h = [...a]), h[I] = E.node);
|
|
3029
3034
|
}
|
|
3030
3035
|
h && (l = h, o = !0);
|
|
3031
3036
|
}
|
|
@@ -3085,14 +3090,14 @@ function k(e, t) {
|
|
|
3085
3090
|
}
|
|
3086
3091
|
function Dn(e) {
|
|
3087
3092
|
return new Worker(
|
|
3088
|
-
"" + new URL("assets/ui-worker-
|
|
3093
|
+
"" + new URL("assets/ui-worker-CgUxgLaW.js", import.meta.url).href,
|
|
3089
3094
|
{
|
|
3090
3095
|
type: "module",
|
|
3091
3096
|
name: e?.name
|
|
3092
3097
|
}
|
|
3093
3098
|
);
|
|
3094
3099
|
}
|
|
3095
|
-
const
|
|
3100
|
+
const m = qt("IkonUiCore");
|
|
3096
3101
|
class Ln {
|
|
3097
3102
|
unsubscribeProtocolMessages;
|
|
3098
3103
|
unsubscribeState;
|
|
@@ -3144,7 +3149,7 @@ class Ln {
|
|
|
3144
3149
|
initialize(t, s) {
|
|
3145
3150
|
this.client = t, this.useUiWorker && this.startUiWorker(s);
|
|
3146
3151
|
const r = {
|
|
3147
|
-
opcodeGroupsMask:
|
|
3152
|
+
opcodeGroupsMask: L.GROUP_CORE | L.GROUP_UI | L.GROUP_ACTIONS
|
|
3148
3153
|
};
|
|
3149
3154
|
this.unsubscribeProtocolMessages = t.subscribeToProtocolMessages((n) => {
|
|
3150
3155
|
if (this.uiWorker) {
|
|
@@ -3162,7 +3167,7 @@ class Ln {
|
|
|
3162
3167
|
try {
|
|
3163
3168
|
this.uiWorker = new Dn();
|
|
3164
3169
|
} catch (i) {
|
|
3165
|
-
|
|
3170
|
+
m.warn("Failed to create UI worker, falling back to main thread", i), this.uiWorker = null;
|
|
3166
3171
|
return;
|
|
3167
3172
|
}
|
|
3168
3173
|
const s = t?.threading?.flushIntervalMs, r = t?.threading?.maxLatencyMs;
|
|
@@ -3170,7 +3175,7 @@ class Ln {
|
|
|
3170
3175
|
this.handleUiStoreOpBatch(i.data);
|
|
3171
3176
|
}), this.uiWorker.addEventListener("error", (i) => {
|
|
3172
3177
|
const n = [i.message, i.filename, i.lineno, i.colno].filter((o) => o != null && String(o).length > 0);
|
|
3173
|
-
|
|
3178
|
+
m.warn(`UI worker failed, falling back to main thread: ${n.join(" ")}`.trim()), this.uiWorker?.terminate(), this.uiWorker = null, this.rehydrateStoresForMainThread();
|
|
3174
3179
|
});
|
|
3175
3180
|
}
|
|
3176
3181
|
rehydrateStoresForMainThread() {
|
|
@@ -3198,7 +3203,7 @@ class Ln {
|
|
|
3198
3203
|
const s = t.slice().buffer;
|
|
3199
3204
|
this.uiWorker.postMessage({ type: "protocol", message: s }, [s]);
|
|
3200
3205
|
} catch (s) {
|
|
3201
|
-
|
|
3206
|
+
m.warn("Failed to forward message to UI worker", s);
|
|
3202
3207
|
}
|
|
3203
3208
|
}
|
|
3204
3209
|
handleUiStoreOpBatch(t) {
|
|
@@ -3253,22 +3258,22 @@ class Ln {
|
|
|
3253
3258
|
}
|
|
3254
3259
|
handleProtocolMessage(t) {
|
|
3255
3260
|
switch (Qt(t)) {
|
|
3256
|
-
case
|
|
3261
|
+
case L.CORE_GLOBAL_STATE:
|
|
3257
3262
|
this.handleGlobalState(t);
|
|
3258
3263
|
return;
|
|
3259
|
-
case
|
|
3264
|
+
case L.UI_UPDATE:
|
|
3260
3265
|
this.handleUiUpdate(t);
|
|
3261
3266
|
return;
|
|
3262
|
-
case
|
|
3267
|
+
case L.UI_STYLES:
|
|
3263
3268
|
this.handleUiStyles(t);
|
|
3264
3269
|
return;
|
|
3265
|
-
case
|
|
3270
|
+
case L.UI_STYLES_BATCH:
|
|
3266
3271
|
this.handleUiStylesBatch(t);
|
|
3267
3272
|
return;
|
|
3268
|
-
case
|
|
3273
|
+
case L.UI_STYLES_DELETE:
|
|
3269
3274
|
this.handleUiStylesDelete(t);
|
|
3270
3275
|
return;
|
|
3271
|
-
case
|
|
3276
|
+
case L.ACTION_UI_CLEAR_STREAM:
|
|
3272
3277
|
this.handleClearStream(t);
|
|
3273
3278
|
return;
|
|
3274
3279
|
default:
|
|
@@ -3283,7 +3288,7 @@ class Ln {
|
|
|
3283
3288
|
for (const i of this.uiStore.getSnapshots())
|
|
3284
3289
|
r.has(i.streamId) || (this.uiStore.remove(i.streamId), this.notifyUiStreamCleared(i.streamId));
|
|
3285
3290
|
}).catch((s) => {
|
|
3286
|
-
|
|
3291
|
+
m.error("Failed to handle global state", s);
|
|
3287
3292
|
});
|
|
3288
3293
|
}
|
|
3289
3294
|
handleUiUpdate(t) {
|
|
@@ -3292,7 +3297,7 @@ class Ln {
|
|
|
3292
3297
|
const n = fn(i);
|
|
3293
3298
|
this.notifyUiUpdate(r, n), this.uiStore.apply(r, n), this.sendUiUpdateAck(s.trackId, n.snapshot.version, s.senderId);
|
|
3294
3299
|
}).catch((i) => {
|
|
3295
|
-
i instanceof D ?
|
|
3300
|
+
i instanceof D ? m.warn("Failed to parse UI update", i.causeError ?? i) : m.error("Failed to apply UI update", i);
|
|
3296
3301
|
});
|
|
3297
3302
|
}
|
|
3298
3303
|
handleUiStyles(t) {
|
|
@@ -3305,7 +3310,7 @@ class Ln {
|
|
|
3305
3310
|
};
|
|
3306
3311
|
this.uiStyles.set(r.styleId, r), this.notifyUiStyle(r);
|
|
3307
3312
|
}).catch((s) => {
|
|
3308
|
-
|
|
3313
|
+
m.error("Failed to handle UI styles", s);
|
|
3309
3314
|
});
|
|
3310
3315
|
}
|
|
3311
3316
|
handleUiStylesBatch(t) {
|
|
@@ -3321,7 +3326,7 @@ class Ln {
|
|
|
3321
3326
|
this.uiStyles.set(i.styleId, i), this.notifyUiStyle(i);
|
|
3322
3327
|
}
|
|
3323
3328
|
}).catch((s) => {
|
|
3324
|
-
|
|
3329
|
+
m.error("Failed to handle UI styles batch", s);
|
|
3325
3330
|
});
|
|
3326
3331
|
}
|
|
3327
3332
|
handleUiStylesDelete(t) {
|
|
@@ -3332,7 +3337,7 @@ class Ln {
|
|
|
3332
3337
|
this.notifyUiStyleDelete(s.StyleIds);
|
|
3333
3338
|
}
|
|
3334
3339
|
}).catch((s) => {
|
|
3335
|
-
|
|
3340
|
+
m.error("Failed to handle UI styles delete", s);
|
|
3336
3341
|
});
|
|
3337
3342
|
}
|
|
3338
3343
|
handleClearStream(t) {
|
|
@@ -3361,7 +3366,7 @@ class Ln {
|
|
|
3361
3366
|
const i = r !== void 0 ? { trackId: t, targetIds: [r] } : { trackId: t }, n = nn({ Version: s }, this.client.sessionId ?? 0, i);
|
|
3362
3367
|
this.client.sendProtocolMessage(n);
|
|
3363
3368
|
} catch (i) {
|
|
3364
|
-
|
|
3369
|
+
m.warn("Failed to send UI update ack", i);
|
|
3365
3370
|
}
|
|
3366
3371
|
}
|
|
3367
3372
|
}
|