@fest-lib/uniform 0.1.6 → 0.1.8
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/dist/{cbor-x-DhdMOAu4.js → cbor-x-CR9Hs652.js} +413 -388
- package/dist/uniform.js +1149 -1268
- package/package.json +3 -3
- package/dist/index.js +0 -8417
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Ie;
|
|
2
2
|
try {
|
|
3
|
-
|
|
3
|
+
Ie = new TextDecoder();
|
|
4
4
|
} catch {
|
|
5
5
|
}
|
|
6
|
-
var p, G,
|
|
6
|
+
var p, G, f = 0, Qe = [], ft = 105, ot = 57342, ut = 57343, ze = 57337, $e = 6, ee = {}, ne = 11281e4, W = 1681e4, Me = Qe, ke = 0, E = {}, B, ye, pe = 0, le = 0, D, K, R = [], Ue = [], N, V, se, Je = {
|
|
7
7
|
useRecords: !1,
|
|
8
8
|
mapsAsObjects: !0
|
|
9
9
|
}, ae = !1, et = 2;
|
|
@@ -16,7 +16,7 @@ var tt = class ve {
|
|
|
16
16
|
constructor(t) {
|
|
17
17
|
if (t && ((t.keyMap || t._keyMap) && !t.useRecords && (t.useRecords = !1, t.mapsAsObjects = !0), t.useRecords === !1 && t.mapsAsObjects === void 0 && (t.mapsAsObjects = !0), t.getStructures && (t.getShared = t.getStructures), t.getShared && !t.structures && ((t.structures = []).uninitialized = !0), t.keyMap)) {
|
|
18
18
|
this.mapKey = /* @__PURE__ */ new Map();
|
|
19
|
-
for (let [
|
|
19
|
+
for (let [n, a] of Object.entries(t.keyMap)) this.mapKey.set(a, n);
|
|
20
20
|
}
|
|
21
21
|
Object.assign(this, t);
|
|
22
22
|
}
|
|
@@ -28,9 +28,9 @@ var tt = class ve {
|
|
|
28
28
|
}
|
|
29
29
|
encodeKeys(t) {
|
|
30
30
|
if (!this._keyMap) return t;
|
|
31
|
-
let
|
|
32
|
-
for (let [a, l] of Object.entries(t))
|
|
33
|
-
return
|
|
31
|
+
let n = /* @__PURE__ */ new Map();
|
|
32
|
+
for (let [a, l] of Object.entries(t)) n.set(this._keyMap.hasOwnProperty(a) ? this._keyMap[a] : a, l);
|
|
33
|
+
return n;
|
|
34
34
|
}
|
|
35
35
|
decodeKeys(t) {
|
|
36
36
|
if (!this._keyMap || t.constructor.name != "Map") return t;
|
|
@@ -38,16 +38,16 @@ var tt = class ve {
|
|
|
38
38
|
this._mapKey = /* @__PURE__ */ new Map();
|
|
39
39
|
for (let [a, l] of Object.entries(this._keyMap)) this._mapKey.set(l, a);
|
|
40
40
|
}
|
|
41
|
-
let
|
|
42
|
-
return t.forEach((a, l) =>
|
|
41
|
+
let n = {};
|
|
42
|
+
return t.forEach((a, l) => n[z(this._mapKey.has(l) ? this._mapKey.get(l) : l)] = a), n;
|
|
43
43
|
}
|
|
44
|
-
mapDecode(t,
|
|
44
|
+
mapDecode(t, n) {
|
|
45
45
|
let a = this.decode(t);
|
|
46
46
|
return this._keyMap && a.constructor.name === "Array" ? a.map((l) => this.decodeKeys(l)) : a;
|
|
47
47
|
}
|
|
48
|
-
decode(t,
|
|
49
|
-
if (p) return st(() => (_e(), this ? this.decode(t,
|
|
50
|
-
G =
|
|
48
|
+
decode(t, n) {
|
|
49
|
+
if (p) return st(() => (_e(), this ? this.decode(t, n) : ve.prototype.decode.call(Je, t, n)));
|
|
50
|
+
G = n > -1 ? n : t.length, f = 0, ke = 0, le = 0, ye = null, Me = Qe, D = null, p = t;
|
|
51
51
|
try {
|
|
52
52
|
V = t.dataView || (t.dataView = new DataView(t.buffer, t.byteOffset, t.byteLength));
|
|
53
53
|
} catch (a) {
|
|
@@ -61,23 +61,23 @@ var tt = class ve {
|
|
|
61
61
|
E = Je, (!B || B.length > 0) && (B = []), N = null;
|
|
62
62
|
return ue();
|
|
63
63
|
}
|
|
64
|
-
decodeMultiple(t,
|
|
64
|
+
decodeMultiple(t, n) {
|
|
65
65
|
let a, l = 0;
|
|
66
66
|
try {
|
|
67
|
-
let
|
|
67
|
+
let o = t.length;
|
|
68
68
|
ae = !0;
|
|
69
|
-
let h = this ? this.decode(t,
|
|
70
|
-
if (
|
|
71
|
-
if (
|
|
72
|
-
for (;
|
|
73
|
-
if (l =
|
|
69
|
+
let h = this ? this.decode(t, o) : Ve.decode(t, o);
|
|
70
|
+
if (n) {
|
|
71
|
+
if (n(h) === !1) return;
|
|
72
|
+
for (; f < o; )
|
|
73
|
+
if (l = f, n(ue()) === !1) return;
|
|
74
74
|
} else {
|
|
75
|
-
for (a = [h];
|
|
76
|
-
l =
|
|
75
|
+
for (a = [h]; f < o; )
|
|
76
|
+
l = f, a.push(ue());
|
|
77
77
|
return a;
|
|
78
78
|
}
|
|
79
|
-
} catch (
|
|
80
|
-
throw
|
|
79
|
+
} catch (o) {
|
|
80
|
+
throw o.lastPosition = l, o.values = a, o;
|
|
81
81
|
} finally {
|
|
82
82
|
ae = !1, _e();
|
|
83
83
|
}
|
|
@@ -87,15 +87,15 @@ function ue() {
|
|
|
87
87
|
try {
|
|
88
88
|
let e = O();
|
|
89
89
|
if (D) {
|
|
90
|
-
if (
|
|
90
|
+
if (f >= D.postBundlePosition) {
|
|
91
91
|
let t = /* @__PURE__ */ new Error("Unexpected bundle position");
|
|
92
92
|
throw t.incomplete = !0, t;
|
|
93
93
|
}
|
|
94
|
-
|
|
94
|
+
f = D.postBundlePosition, D = null;
|
|
95
95
|
}
|
|
96
|
-
if (
|
|
96
|
+
if (f == G)
|
|
97
97
|
B = null, p = null, K && (K = null);
|
|
98
|
-
else if (
|
|
98
|
+
else if (f > G) {
|
|
99
99
|
let t = /* @__PURE__ */ new Error("Unexpected end of CBOR data");
|
|
100
100
|
throw t.incomplete = !0, t;
|
|
101
101
|
} else if (!ae) throw new Error("Data read, but end of buffer not reached");
|
|
@@ -105,36 +105,36 @@ function ue() {
|
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
function O() {
|
|
108
|
-
let e = p[
|
|
108
|
+
let e = p[f++], t = e >> 5;
|
|
109
109
|
if (e = e & 31, e > 23) switch (e) {
|
|
110
110
|
case 24:
|
|
111
|
-
e = p[
|
|
111
|
+
e = p[f++];
|
|
112
112
|
break;
|
|
113
113
|
case 25:
|
|
114
114
|
if (t == 7) return yt();
|
|
115
|
-
e = V.getUint16(
|
|
115
|
+
e = V.getUint16(f), f += 2;
|
|
116
116
|
break;
|
|
117
117
|
case 26:
|
|
118
118
|
if (t == 7) {
|
|
119
|
-
let
|
|
119
|
+
let n = V.getFloat32(f);
|
|
120
120
|
if (E.useFloat32 > 2) {
|
|
121
|
-
let a = Fe[(p[
|
|
122
|
-
return
|
|
121
|
+
let a = Fe[(p[f] & 127) << 1 | p[f + 1] >> 7];
|
|
122
|
+
return f += 4, (a * n + (n > 0 ? 0.5 : -0.5) >> 0) / a;
|
|
123
123
|
}
|
|
124
|
-
return
|
|
124
|
+
return f += 4, n;
|
|
125
125
|
}
|
|
126
|
-
if (e = V.getUint32(
|
|
126
|
+
if (e = V.getUint32(f), f += 4, t === 1) return -1 - e;
|
|
127
127
|
break;
|
|
128
128
|
case 27:
|
|
129
129
|
if (t == 7) {
|
|
130
|
-
let
|
|
131
|
-
return
|
|
130
|
+
let n = V.getFloat64(f);
|
|
131
|
+
return f += 8, n;
|
|
132
132
|
}
|
|
133
133
|
if (t > 1) {
|
|
134
|
-
if (V.getUint32(
|
|
135
|
-
e = V.getUint32(
|
|
136
|
-
} else E.int64AsNumber ? (e = V.getUint32(
|
|
137
|
-
|
|
134
|
+
if (V.getUint32(f) > 0) throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");
|
|
135
|
+
e = V.getUint32(f + 4);
|
|
136
|
+
} else E.int64AsNumber ? (e = V.getUint32(f) * 4294967296, e += V.getUint32(f + 4)) : e = V.getBigUint64(f);
|
|
137
|
+
f += 8;
|
|
138
138
|
break;
|
|
139
139
|
case 31:
|
|
140
140
|
switch (t) {
|
|
@@ -142,23 +142,23 @@ function O() {
|
|
|
142
142
|
case 3:
|
|
143
143
|
throw new Error("Indefinite length not supported for byte or text strings");
|
|
144
144
|
case 4:
|
|
145
|
-
let
|
|
145
|
+
let n = [], a, l = 0;
|
|
146
146
|
for (; (a = O()) != ee; ) {
|
|
147
147
|
if (l >= ne) throw new Error(`Array length exceeds ${ne}`);
|
|
148
|
-
|
|
148
|
+
n[l++] = a;
|
|
149
149
|
}
|
|
150
|
-
return t == 4 ?
|
|
150
|
+
return t == 4 ? n : t == 3 ? n.join("") : Buffer.concat(n);
|
|
151
151
|
case 5:
|
|
152
|
-
let
|
|
152
|
+
let o;
|
|
153
153
|
if (E.mapsAsObjects) {
|
|
154
154
|
let h = {}, y = 0;
|
|
155
|
-
if (E.keyMap) for (; (
|
|
155
|
+
if (E.keyMap) for (; (o = O()) != ee; ) {
|
|
156
156
|
if (y++ >= W) throw new Error(`Property count exceeds ${W}`);
|
|
157
|
-
h[z(E.decodeKey(
|
|
157
|
+
h[z(E.decodeKey(o))] = O();
|
|
158
158
|
}
|
|
159
|
-
else for (; (
|
|
159
|
+
else for (; (o = O()) != ee; ) {
|
|
160
160
|
if (y++ >= W) throw new Error(`Property count exceeds ${W}`);
|
|
161
|
-
h[z(
|
|
161
|
+
h[z(o)] = O();
|
|
162
162
|
}
|
|
163
163
|
return h;
|
|
164
164
|
} else {
|
|
@@ -166,15 +166,15 @@ function O() {
|
|
|
166
166
|
let h = /* @__PURE__ */ new Map();
|
|
167
167
|
if (E.keyMap) {
|
|
168
168
|
let y = 0;
|
|
169
|
-
for (; (
|
|
169
|
+
for (; (o = O()) != ee; ) {
|
|
170
170
|
if (y++ >= W) throw new Error(`Map size exceeds ${W}`);
|
|
171
|
-
h.set(E.decodeKey(
|
|
171
|
+
h.set(E.decodeKey(o), O());
|
|
172
172
|
}
|
|
173
173
|
} else {
|
|
174
174
|
let y = 0;
|
|
175
|
-
for (; (
|
|
175
|
+
for (; (o = O()) != ee; ) {
|
|
176
176
|
if (y++ >= W) throw new Error(`Map size exceeds ${W}`);
|
|
177
|
-
h.set(
|
|
177
|
+
h.set(o, O());
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
return h;
|
|
@@ -195,7 +195,7 @@ function O() {
|
|
|
195
195
|
case 2:
|
|
196
196
|
return ht(e);
|
|
197
197
|
case 3:
|
|
198
|
-
if (le >=
|
|
198
|
+
if (le >= f) return ye.slice(f - pe, (f += e) - pe);
|
|
199
199
|
if (le == 0 && G < 140 && e < 32) {
|
|
200
200
|
let l = e < 16 ? rt(e) : dt(e);
|
|
201
201
|
if (l != null) return l;
|
|
@@ -203,21 +203,21 @@ function O() {
|
|
|
203
203
|
return ct(e);
|
|
204
204
|
case 4:
|
|
205
205
|
if (e >= ne) throw new Error(`Array length exceeds ${ne}`);
|
|
206
|
-
let
|
|
207
|
-
for (let l = 0; l < e; l++)
|
|
208
|
-
return
|
|
206
|
+
let n = new Array(e);
|
|
207
|
+
for (let l = 0; l < e; l++) n[l] = O();
|
|
208
|
+
return n;
|
|
209
209
|
case 5:
|
|
210
210
|
if (e >= W) throw new Error(`Map size exceeds ${ne}`);
|
|
211
211
|
if (E.mapsAsObjects) {
|
|
212
212
|
let l = {};
|
|
213
|
-
if (E.keyMap) for (let
|
|
214
|
-
else for (let
|
|
213
|
+
if (E.keyMap) for (let o = 0; o < e; o++) l[z(E.decodeKey(O()))] = O();
|
|
214
|
+
else for (let o = 0; o < e; o++) l[z(O())] = O();
|
|
215
215
|
return l;
|
|
216
216
|
} else {
|
|
217
217
|
se && (E.mapsAsObjects = !0, se = !1);
|
|
218
218
|
let l = /* @__PURE__ */ new Map();
|
|
219
|
-
if (E.keyMap) for (let
|
|
220
|
-
else for (let
|
|
219
|
+
if (E.keyMap) for (let o = 0; o < e; o++) l.set(E.decodeKey(O()), O());
|
|
220
|
+
else for (let o = 0; o < e; o++) l.set(O(), O());
|
|
221
221
|
return l;
|
|
222
222
|
}
|
|
223
223
|
case 6:
|
|
@@ -227,21 +227,21 @@ function O() {
|
|
|
227
227
|
return l.read || (l.read = xe(l)), l.read();
|
|
228
228
|
if (e < 65536) {
|
|
229
229
|
if (e == ut) {
|
|
230
|
-
let
|
|
230
|
+
let o = re(), h = O(), y = O();
|
|
231
231
|
Re(h, y);
|
|
232
|
-
let
|
|
233
|
-
if (E.keyMap) for (let S = 2; S <
|
|
232
|
+
let U = {};
|
|
233
|
+
if (E.keyMap) for (let S = 2; S < o; S++) {
|
|
234
234
|
let x = E.decodeKey(y[S - 2]);
|
|
235
|
-
|
|
235
|
+
U[z(x)] = O();
|
|
236
236
|
}
|
|
237
|
-
else for (let S = 2; S <
|
|
237
|
+
else for (let S = 2; S < o; S++) {
|
|
238
238
|
let x = y[S - 2];
|
|
239
|
-
|
|
239
|
+
U[z(x)] = O();
|
|
240
240
|
}
|
|
241
|
-
return
|
|
241
|
+
return U;
|
|
242
242
|
} else if (e == ot) {
|
|
243
|
-
let
|
|
244
|
-
for (let y = 2; y <
|
|
243
|
+
let o = re(), h = O();
|
|
244
|
+
for (let y = 2; y < o; y++) Re(h++, O());
|
|
245
245
|
return O();
|
|
246
246
|
} else if (e == ze) return St();
|
|
247
247
|
if (E.getShared && (Te(), l = B[e & 8191], l))
|
|
@@ -249,11 +249,12 @@ function O() {
|
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
let a = R[e];
|
|
252
|
-
if (a)
|
|
252
|
+
if (a)
|
|
253
|
+
return a.handlesRead ? a(O) : a(O());
|
|
253
254
|
{
|
|
254
255
|
let l = O();
|
|
255
|
-
for (let
|
|
256
|
-
let h = Ue[
|
|
256
|
+
for (let o = 0; o < Ue.length; o++) {
|
|
257
|
+
let h = Ue[o](e, l);
|
|
257
258
|
if (h !== void 0) return h;
|
|
258
259
|
}
|
|
259
260
|
return new Z(l, e);
|
|
@@ -285,32 +286,32 @@ var We = /^[a-zA-Z_$][a-zA-Z\d_$]*$/;
|
|
|
285
286
|
function xe(e) {
|
|
286
287
|
if (!e) throw new Error("Structure is required in record definition");
|
|
287
288
|
function t() {
|
|
288
|
-
let
|
|
289
|
-
if (
|
|
289
|
+
let n = p[f++];
|
|
290
|
+
if (n = n & 31, n > 23) switch (n) {
|
|
290
291
|
case 24:
|
|
291
|
-
|
|
292
|
+
n = p[f++];
|
|
292
293
|
break;
|
|
293
294
|
case 25:
|
|
294
|
-
|
|
295
|
+
n = V.getUint16(f), f += 2;
|
|
295
296
|
break;
|
|
296
297
|
case 26:
|
|
297
|
-
|
|
298
|
+
n = V.getUint32(f), f += 4;
|
|
298
299
|
break;
|
|
299
300
|
default:
|
|
300
|
-
throw new Error("Expected array header, but got " + p[
|
|
301
|
+
throw new Error("Expected array header, but got " + p[f - 1]);
|
|
301
302
|
}
|
|
302
303
|
let a = this.compiledReader;
|
|
303
304
|
for (; a; ) {
|
|
304
|
-
if (a.propertyCount ===
|
|
305
|
+
if (a.propertyCount === n) return a(O);
|
|
305
306
|
a = a.next;
|
|
306
307
|
}
|
|
307
308
|
if (this.slowReads++ >= et) {
|
|
308
|
-
let
|
|
309
|
-
return a = E.keyMap ? new Function("r", "return {" +
|
|
309
|
+
let o = this.length == n ? this : this.slice(0, n);
|
|
310
|
+
return a = E.keyMap ? new Function("r", "return {" + o.map((h) => E.decodeKey(h)).map((h) => We.test(h) ? z(h) + ":r()" : "[" + JSON.stringify(h) + "]:r()").join(",") + "}") : new Function("r", "return {" + o.map((h) => We.test(h) ? z(h) + ":r()" : "[" + JSON.stringify(h) + "]:r()").join(",") + "}"), this.compiledReader && (a.next = this.compiledReader), a.propertyCount = n, this.compiledReader = a, a(O);
|
|
310
311
|
}
|
|
311
312
|
let l = {};
|
|
312
|
-
if (E.keyMap) for (let
|
|
313
|
-
else for (let
|
|
313
|
+
if (E.keyMap) for (let o = 0; o < n; o++) l[z(E.decodeKey(this[o]))] = O();
|
|
314
|
+
else for (let o = 0; o < n; o++) l[z(this[o])] = O();
|
|
314
315
|
return l;
|
|
315
316
|
}
|
|
316
317
|
return e.slowReads = 0, t;
|
|
@@ -326,21 +327,38 @@ function Be(e) {
|
|
|
326
327
|
let t;
|
|
327
328
|
if (e < 16 && (t = rt(e)))
|
|
328
329
|
return t;
|
|
329
|
-
if (e > 64 &&
|
|
330
|
-
const
|
|
331
|
-
for (t = "";
|
|
332
|
-
const l = p[
|
|
330
|
+
if (e > 64 && Ie) return Ie.decode(p.subarray(f, f += e));
|
|
331
|
+
const n = f + e, a = [];
|
|
332
|
+
for (t = ""; f < n; ) {
|
|
333
|
+
const l = p[f++];
|
|
333
334
|
if ((l & 128) === 0) a.push(l);
|
|
334
|
-
else if ((l & 224) === 192)
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
335
|
+
else if ((l & 224) === 192)
|
|
336
|
+
if (l < 194 || f >= n || (p[f] & 192) !== 128) a.push(65533);
|
|
337
|
+
else {
|
|
338
|
+
const o = p[f++] & 63;
|
|
339
|
+
a.push((l & 31) << 6 | o);
|
|
340
|
+
}
|
|
341
|
+
else if ((l & 240) === 224) {
|
|
342
|
+
const o = f < n ? p[f] : 0;
|
|
343
|
+
if (f >= n || (o & 192) !== 128 || l === 224 && o < 160 || l === 237 && o >= 160) a.push(65533);
|
|
344
|
+
else if (f++, f >= n || (p[f] & 192) !== 128) a.push(65533);
|
|
345
|
+
else {
|
|
346
|
+
const h = p[f++] & 63;
|
|
347
|
+
a.push((l & 31) << 12 | (o & 63) << 6 | h);
|
|
348
|
+
}
|
|
340
349
|
} else if ((l & 248) === 240) {
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
|
|
350
|
+
const o = f < n ? p[f] : 0;
|
|
351
|
+
if (l > 244 || f >= n || (o & 192) !== 128 || l === 240 && o < 144 || l === 244 && o >= 144) a.push(65533);
|
|
352
|
+
else if (f++, f >= n || (p[f] & 192) !== 128) a.push(65533);
|
|
353
|
+
else {
|
|
354
|
+
const h = p[f++] & 63;
|
|
355
|
+
if (f >= n || (p[f] & 192) !== 128) a.push(65533);
|
|
356
|
+
else {
|
|
357
|
+
const y = p[f++] & 63;
|
|
358
|
+
let U = (l & 7) << 18 | (o & 63) << 12 | h << 6 | y;
|
|
359
|
+
U -= 65536, a.push(U >>> 10 & 1023 | 55296), a.push(56320 | U & 1023);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
344
362
|
} else a.push(65533);
|
|
345
363
|
a.length >= 4096 && (t += P.apply(String, a), a.length = 0);
|
|
346
364
|
}
|
|
@@ -348,147 +366,148 @@ function Be(e) {
|
|
|
348
366
|
}
|
|
349
367
|
var P = String.fromCharCode;
|
|
350
368
|
function dt(e) {
|
|
351
|
-
let t =
|
|
369
|
+
let t = f, n = new Array(e);
|
|
352
370
|
for (let a = 0; a < e; a++) {
|
|
353
|
-
const l = p[
|
|
371
|
+
const l = p[f++];
|
|
354
372
|
if ((l & 128) > 0) {
|
|
355
|
-
|
|
373
|
+
f = t;
|
|
356
374
|
return;
|
|
357
375
|
}
|
|
358
|
-
|
|
376
|
+
n[a] = l;
|
|
359
377
|
}
|
|
360
|
-
return P.apply(String,
|
|
378
|
+
return P.apply(String, n);
|
|
361
379
|
}
|
|
362
380
|
function rt(e) {
|
|
363
|
-
if (e < 4)
|
|
364
|
-
if (e
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
381
|
+
if (e < 4)
|
|
382
|
+
if (e < 2) {
|
|
383
|
+
if (e === 0) return "";
|
|
384
|
+
{
|
|
385
|
+
let t = p[f++];
|
|
386
|
+
if ((t & 128) > 1) {
|
|
387
|
+
f -= 1;
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
return P(t);
|
|
391
|
+
}
|
|
392
|
+
} else {
|
|
393
|
+
let t = p[f++], n = p[f++];
|
|
394
|
+
if ((t & 128) > 0 || (n & 128) > 0) {
|
|
395
|
+
f -= 2;
|
|
369
396
|
return;
|
|
370
397
|
}
|
|
371
|
-
return P(t);
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
return;
|
|
378
|
-
}
|
|
379
|
-
if (e < 3) return P(t, s);
|
|
380
|
-
let a = p[o++];
|
|
381
|
-
if ((a & 128) > 0) {
|
|
382
|
-
o -= 3;
|
|
383
|
-
return;
|
|
398
|
+
if (e < 3) return P(t, n);
|
|
399
|
+
let a = p[f++];
|
|
400
|
+
if ((a & 128) > 0) {
|
|
401
|
+
f -= 3;
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
return P(t, n, a);
|
|
384
405
|
}
|
|
385
|
-
return P(t, s, a);
|
|
386
|
-
}
|
|
387
406
|
else {
|
|
388
|
-
let t = p[
|
|
389
|
-
if ((t & 128) > 0 || (
|
|
390
|
-
|
|
407
|
+
let t = p[f++], n = p[f++], a = p[f++], l = p[f++];
|
|
408
|
+
if ((t & 128) > 0 || (n & 128) > 0 || (a & 128) > 0 || (l & 128) > 0) {
|
|
409
|
+
f -= 4;
|
|
391
410
|
return;
|
|
392
411
|
}
|
|
393
412
|
if (e < 6) {
|
|
394
|
-
if (e === 4) return P(t,
|
|
413
|
+
if (e === 4) return P(t, n, a, l);
|
|
395
414
|
{
|
|
396
|
-
let
|
|
397
|
-
if ((
|
|
398
|
-
|
|
415
|
+
let o = p[f++];
|
|
416
|
+
if ((o & 128) > 0) {
|
|
417
|
+
f -= 5;
|
|
399
418
|
return;
|
|
400
419
|
}
|
|
401
|
-
return P(t,
|
|
420
|
+
return P(t, n, a, l, o);
|
|
402
421
|
}
|
|
403
422
|
} else if (e < 8) {
|
|
404
|
-
let
|
|
405
|
-
if ((
|
|
406
|
-
|
|
423
|
+
let o = p[f++], h = p[f++];
|
|
424
|
+
if ((o & 128) > 0 || (h & 128) > 0) {
|
|
425
|
+
f -= 6;
|
|
407
426
|
return;
|
|
408
427
|
}
|
|
409
|
-
if (e < 7) return P(t,
|
|
410
|
-
let y = p[
|
|
428
|
+
if (e < 7) return P(t, n, a, l, o, h);
|
|
429
|
+
let y = p[f++];
|
|
411
430
|
if ((y & 128) > 0) {
|
|
412
|
-
|
|
431
|
+
f -= 7;
|
|
413
432
|
return;
|
|
414
433
|
}
|
|
415
|
-
return P(t,
|
|
434
|
+
return P(t, n, a, l, o, h, y);
|
|
416
435
|
} else {
|
|
417
|
-
let
|
|
418
|
-
if ((
|
|
419
|
-
|
|
436
|
+
let o = p[f++], h = p[f++], y = p[f++], U = p[f++];
|
|
437
|
+
if ((o & 128) > 0 || (h & 128) > 0 || (y & 128) > 0 || (U & 128) > 0) {
|
|
438
|
+
f -= 8;
|
|
420
439
|
return;
|
|
421
440
|
}
|
|
422
441
|
if (e < 10) {
|
|
423
|
-
if (e === 8) return P(t,
|
|
442
|
+
if (e === 8) return P(t, n, a, l, o, h, y, U);
|
|
424
443
|
{
|
|
425
|
-
let S = p[
|
|
444
|
+
let S = p[f++];
|
|
426
445
|
if ((S & 128) > 0) {
|
|
427
|
-
|
|
446
|
+
f -= 9;
|
|
428
447
|
return;
|
|
429
448
|
}
|
|
430
|
-
return P(t,
|
|
449
|
+
return P(t, n, a, l, o, h, y, U, S);
|
|
431
450
|
}
|
|
432
451
|
} else if (e < 12) {
|
|
433
|
-
let S = p[
|
|
452
|
+
let S = p[f++], x = p[f++];
|
|
434
453
|
if ((S & 128) > 0 || (x & 128) > 0) {
|
|
435
|
-
|
|
454
|
+
f -= 10;
|
|
436
455
|
return;
|
|
437
456
|
}
|
|
438
|
-
if (e < 11) return P(t,
|
|
439
|
-
let v = p[
|
|
457
|
+
if (e < 11) return P(t, n, a, l, o, h, y, U, S, x);
|
|
458
|
+
let v = p[f++];
|
|
440
459
|
if ((v & 128) > 0) {
|
|
441
|
-
|
|
460
|
+
f -= 11;
|
|
442
461
|
return;
|
|
443
462
|
}
|
|
444
|
-
return P(t,
|
|
463
|
+
return P(t, n, a, l, o, h, y, U, S, x, v);
|
|
445
464
|
} else {
|
|
446
|
-
let S = p[
|
|
465
|
+
let S = p[f++], x = p[f++], v = p[f++], C = p[f++];
|
|
447
466
|
if ((S & 128) > 0 || (x & 128) > 0 || (v & 128) > 0 || (C & 128) > 0) {
|
|
448
|
-
|
|
467
|
+
f -= 12;
|
|
449
468
|
return;
|
|
450
469
|
}
|
|
451
470
|
if (e < 14) {
|
|
452
|
-
if (e === 12) return P(t,
|
|
471
|
+
if (e === 12) return P(t, n, a, l, o, h, y, U, S, x, v, C);
|
|
453
472
|
{
|
|
454
|
-
let F = p[
|
|
473
|
+
let F = p[f++];
|
|
455
474
|
if ((F & 128) > 0) {
|
|
456
|
-
|
|
475
|
+
f -= 13;
|
|
457
476
|
return;
|
|
458
477
|
}
|
|
459
|
-
return P(t,
|
|
478
|
+
return P(t, n, a, l, o, h, y, U, S, x, v, C, F);
|
|
460
479
|
}
|
|
461
480
|
} else {
|
|
462
|
-
let F = p[
|
|
481
|
+
let F = p[f++], T = p[f++];
|
|
463
482
|
if ((F & 128) > 0 || (T & 128) > 0) {
|
|
464
|
-
|
|
483
|
+
f -= 14;
|
|
465
484
|
return;
|
|
466
485
|
}
|
|
467
|
-
if (e < 15) return P(t,
|
|
468
|
-
let L = p[
|
|
486
|
+
if (e < 15) return P(t, n, a, l, o, h, y, U, S, x, v, C, F, T);
|
|
487
|
+
let L = p[f++];
|
|
469
488
|
if ((L & 128) > 0) {
|
|
470
|
-
|
|
489
|
+
f -= 15;
|
|
471
490
|
return;
|
|
472
491
|
}
|
|
473
|
-
return P(t,
|
|
492
|
+
return P(t, n, a, l, o, h, y, U, S, x, v, C, F, T, L);
|
|
474
493
|
}
|
|
475
494
|
}
|
|
476
495
|
}
|
|
477
496
|
}
|
|
478
497
|
}
|
|
479
498
|
function ht(e) {
|
|
480
|
-
return E.copyBuffers ? Uint8Array.prototype.slice.call(p,
|
|
499
|
+
return E.copyBuffers ? Uint8Array.prototype.slice.call(p, f, f += e) : p.subarray(f, f += e);
|
|
481
500
|
}
|
|
482
501
|
var it = /* @__PURE__ */ new Float32Array(1), ce = new Uint8Array(it.buffer, 0, 4);
|
|
483
502
|
function yt() {
|
|
484
|
-
let e = p[
|
|
485
|
-
if (
|
|
503
|
+
let e = p[f++], t = p[f++], n = (e & 127) >> 2;
|
|
504
|
+
if (n === 31)
|
|
486
505
|
return t || e & 3 ? NaN : e & 128 ? -1 / 0 : 1 / 0;
|
|
487
|
-
if (
|
|
506
|
+
if (n === 0) {
|
|
488
507
|
let a = ((e & 3) << 8 | t) / 16777216;
|
|
489
508
|
return e & 128 ? -a : a;
|
|
490
509
|
}
|
|
491
|
-
return ce[3] = e & 128 | (
|
|
510
|
+
return ce[3] = e & 128 | (n >> 1) + 56, ce[2] = (e & 7) << 5 | t >> 3, ce[1] = t << 5, ce[0] = 0, it[0];
|
|
492
511
|
}
|
|
493
512
|
new Array(4096);
|
|
494
513
|
var Z = class {
|
|
@@ -500,7 +519,7 @@ R[0] = (e) => new Date(e);
|
|
|
500
519
|
R[1] = (e) => new Date(Math.round(e * 1e3));
|
|
501
520
|
R[2] = (e) => {
|
|
502
521
|
let t = BigInt(0);
|
|
503
|
-
for (let
|
|
522
|
+
for (let n = 0, a = e.byteLength; n < a; n++) t = BigInt(e[n]) + (t << BigInt(8));
|
|
504
523
|
return t;
|
|
505
524
|
};
|
|
506
525
|
R[3] = (e) => BigInt(-1) - R[2](e);
|
|
@@ -508,16 +527,16 @@ R[4] = (e) => +(e[1] + "e" + e[0]);
|
|
|
508
527
|
R[5] = (e) => e[1] * Math.exp(e[0] * Math.log(2));
|
|
509
528
|
var Re = (e, t) => {
|
|
510
529
|
e = e - 57344;
|
|
511
|
-
let
|
|
512
|
-
|
|
530
|
+
let n = B[e];
|
|
531
|
+
n && n.isShared && ((B.restoreStructures || (B.restoreStructures = []))[e] = n), B[e] = t, t.read = xe(t);
|
|
513
532
|
};
|
|
514
533
|
R[ft] = (e) => {
|
|
515
|
-
let t = e.length,
|
|
516
|
-
Re(e[0],
|
|
534
|
+
let t = e.length, n = e[1];
|
|
535
|
+
Re(e[0], n);
|
|
517
536
|
let a = {};
|
|
518
537
|
for (let l = 2; l < t; l++) {
|
|
519
|
-
let
|
|
520
|
-
a[z(
|
|
538
|
+
let o = n[l - 2];
|
|
539
|
+
a[z(o)] = e[l];
|
|
521
540
|
}
|
|
522
541
|
return a;
|
|
523
542
|
};
|
|
@@ -529,34 +548,35 @@ var pt = {
|
|
|
529
548
|
};
|
|
530
549
|
R[27] = (e) => (pt[e[0]] || Error)(e[1], e[2]);
|
|
531
550
|
var nt = (e) => {
|
|
532
|
-
if (p[
|
|
533
|
-
let
|
|
534
|
-
throw p.length <
|
|
551
|
+
if (p[f++] != 132) {
|
|
552
|
+
let n = /* @__PURE__ */ new Error("Packed values structure must be followed by a 4 element array");
|
|
553
|
+
throw p.length < f && (n.incomplete = !0), n;
|
|
535
554
|
}
|
|
536
555
|
let t = e();
|
|
537
556
|
if (!t || !t.length) {
|
|
538
|
-
let
|
|
539
|
-
throw
|
|
557
|
+
let n = /* @__PURE__ */ new Error("Packed values structure must be followed by a 4 element array");
|
|
558
|
+
throw n.incomplete = !0, n;
|
|
540
559
|
}
|
|
541
560
|
return N = N ? t.concat(N.slice(t.length)) : t, N.prefixes = e(), N.suffixes = e(), e();
|
|
542
561
|
};
|
|
543
562
|
nt.handlesRead = !0;
|
|
544
563
|
R[51] = nt;
|
|
545
564
|
R[$e] = (e) => {
|
|
546
|
-
if (!N)
|
|
547
|
-
|
|
565
|
+
if (!N)
|
|
566
|
+
if (E.getShared) Te();
|
|
567
|
+
else return new Z(e, $e);
|
|
548
568
|
if (typeof e == "number") return N[16 + (e >= 0 ? 2 * e : -2 * e - 1)];
|
|
549
569
|
let t = /* @__PURE__ */ new Error("No support for non-integer packed references yet");
|
|
550
570
|
throw e === void 0 && (t.incomplete = !0), t;
|
|
551
571
|
};
|
|
552
572
|
R[28] = (e) => {
|
|
553
573
|
K || (K = /* @__PURE__ */ new Map(), K.id = 0);
|
|
554
|
-
let t = K.id++,
|
|
574
|
+
let t = K.id++, n = f, a = p[f], l;
|
|
555
575
|
a >> 5 == 4 ? l = [] : l = {};
|
|
556
|
-
let
|
|
557
|
-
K.set(t,
|
|
576
|
+
let o = { target: l };
|
|
577
|
+
K.set(t, o);
|
|
558
578
|
let h = e();
|
|
559
|
-
return
|
|
579
|
+
return o.used ? (Object.getPrototypeOf(l) !== Object.getPrototypeOf(h) && (f = n, l = h, K.set(t, { target: l }), h = e()), Object.assign(l, h)) : (o.target = h, h);
|
|
560
580
|
};
|
|
561
581
|
R[28].handlesRead = !0;
|
|
562
582
|
R[29] = (e) => {
|
|
@@ -569,8 +589,9 @@ function te(e, t) {
|
|
|
569
589
|
return typeof e == "string" ? e + t : e instanceof Array ? e.concat(t) : Object.assign({}, e, t);
|
|
570
590
|
}
|
|
571
591
|
function q() {
|
|
572
|
-
if (!N)
|
|
573
|
-
|
|
592
|
+
if (!N)
|
|
593
|
+
if (E.getShared) Te();
|
|
594
|
+
else throw new Error("No packed values available");
|
|
574
595
|
return N;
|
|
575
596
|
}
|
|
576
597
|
var wt = 1399353956;
|
|
@@ -615,43 +636,42 @@ var gt = new Uint8Array(new Uint16Array([1]).buffer)[0] == 1, He = [
|
|
|
615
636
|
];
|
|
616
637
|
for (let e = 0; e < He.length; e++) mt(He[e], bt[e]);
|
|
617
638
|
function mt(e, t) {
|
|
618
|
-
let
|
|
639
|
+
let n = "get" + e.name.slice(0, -5), a;
|
|
619
640
|
typeof e == "function" ? a = e.BYTES_PER_ELEMENT : e = null;
|
|
620
641
|
for (let l = 0; l < 2; l++) {
|
|
621
642
|
if (!l && a == 1) continue;
|
|
622
|
-
let
|
|
643
|
+
let o = a == 2 ? 1 : a == 4 ? 2 : a == 8 ? 3 : 0;
|
|
623
644
|
R[l ? t : t - 4] = a == 1 || l == gt ? (h) => {
|
|
624
645
|
if (!e) throw new Error("Could not find typed array for code " + t);
|
|
625
|
-
return !E.copyBuffers && (a === 1 || a === 2 && !(h.byteOffset & 1) || a === 4 && !(h.byteOffset & 3) || a === 8 && !(h.byteOffset & 7)) ? new e(h.buffer, h.byteOffset, h.byteLength >>
|
|
646
|
+
return !E.copyBuffers && (a === 1 || a === 2 && !(h.byteOffset & 1) || a === 4 && !(h.byteOffset & 3) || a === 8 && !(h.byteOffset & 7)) ? new e(h.buffer, h.byteOffset, h.byteLength >> o) : new e(Uint8Array.prototype.slice.call(h, 0).buffer);
|
|
626
647
|
} : (h) => {
|
|
627
648
|
if (!e) throw new Error("Could not find typed array for code " + t);
|
|
628
|
-
let y = new DataView(h.buffer, h.byteOffset, h.byteLength),
|
|
629
|
-
for (let v = 0; v <
|
|
649
|
+
let y = new DataView(h.buffer, h.byteOffset, h.byteLength), U = h.length >> o, S = new e(U), x = y[n];
|
|
650
|
+
for (let v = 0; v < U; v++) S[v] = x.call(y, v << o, l);
|
|
630
651
|
return S;
|
|
631
652
|
};
|
|
632
653
|
}
|
|
633
654
|
}
|
|
634
655
|
function St() {
|
|
635
|
-
let e = re(), t =
|
|
656
|
+
let e = re(), t = f + O();
|
|
636
657
|
for (let a = 2; a < e; a++) {
|
|
637
658
|
let l = re();
|
|
638
|
-
|
|
659
|
+
f += l;
|
|
639
660
|
}
|
|
640
|
-
let
|
|
641
|
-
return
|
|
661
|
+
let n = f;
|
|
662
|
+
return f = t, D = [Be(re()), Be(re())], D.position0 = 0, D.position1 = 0, D.postBundlePosition = f, f = n, O();
|
|
642
663
|
}
|
|
643
664
|
function re() {
|
|
644
|
-
let e = p[
|
|
665
|
+
let e = p[f++] & 31;
|
|
645
666
|
if (e > 23) switch (e) {
|
|
646
667
|
case 24:
|
|
647
|
-
e = p[
|
|
668
|
+
e = p[f++];
|
|
648
669
|
break;
|
|
649
670
|
case 25:
|
|
650
|
-
e = V.getUint16(
|
|
671
|
+
e = V.getUint16(f), f += 2;
|
|
651
672
|
break;
|
|
652
673
|
case 26:
|
|
653
|
-
e = V.getUint32(
|
|
654
|
-
break;
|
|
674
|
+
e = V.getUint32(f), f += 4;
|
|
655
675
|
}
|
|
656
676
|
return e;
|
|
657
677
|
}
|
|
@@ -662,8 +682,8 @@ function Te() {
|
|
|
662
682
|
}
|
|
663
683
|
}
|
|
664
684
|
function st(e) {
|
|
665
|
-
let t = G,
|
|
666
|
-
return G = t,
|
|
685
|
+
let t = G, n = f, a = ke, l = pe, o = le, h = ye, y = Me, U = K, S = D, x = new Uint8Array(p.slice(0, G)), v = B, C = E, F = ae, T = e();
|
|
686
|
+
return G = t, f = n, ke = a, pe = l, le = o, ye = h, Me = y, K = U, D = S, p = x, ae = F, B = v, E = C, V = new DataView(p.buffer, p.byteOffset, p.byteLength), T;
|
|
667
687
|
}
|
|
668
688
|
function _e() {
|
|
669
689
|
p = null, K = null, B = null;
|
|
@@ -680,17 +700,17 @@ try {
|
|
|
680
700
|
de = new TextEncoder();
|
|
681
701
|
} catch {
|
|
682
702
|
}
|
|
683
|
-
var De, lt, we = typeof globalThis == "object" && globalThis.Buffer, fe = typeof we < "u", Se = fe ? we.allocUnsafeSlow : Uint8Array, Ye = fe ? we : Uint8Array, qe = 256, Ge = fe ? 4294967296 : 2144337920, Ae,
|
|
703
|
+
var De, lt, we = typeof globalThis == "object" && globalThis.Buffer, fe = typeof we < "u", Se = fe ? we.allocUnsafeSlow : Uint8Array, Ye = fe ? we : Uint8Array, qe = 256, Ge = fe ? 4294967296 : 2144337920, Ae, s, k, r = 0, H, _ = null, Et = 61440, Ot = /[\u0080-\uFFFF]/, j = /* @__PURE__ */ Symbol("record-id"), It = class extends tt {
|
|
684
704
|
constructor(e) {
|
|
685
705
|
super(e), this.offset = 0;
|
|
686
|
-
let t,
|
|
706
|
+
let t, n, a, l, o;
|
|
687
707
|
e = e || {};
|
|
688
708
|
let h = Ye.prototype.utf8Write ? function(i, w) {
|
|
689
|
-
return
|
|
709
|
+
return s.utf8Write(i, w, s.byteLength - w);
|
|
690
710
|
} : de && de.encodeInto ? function(i, w) {
|
|
691
|
-
return de.encodeInto(i,
|
|
692
|
-
} : !1, y = this,
|
|
693
|
-
if (S == null && (S =
|
|
711
|
+
return de.encodeInto(i, s.subarray(w)).written;
|
|
712
|
+
} : !1, y = this, U = e.structures || e.saveStructures, S = e.maxSharedStructures;
|
|
713
|
+
if (S == null && (S = U ? 128 : 0), S > 8190) throw new Error("Maximum maxSharedStructure is 8190");
|
|
694
714
|
let x = e.sequential;
|
|
695
715
|
x && (S = 0), this.structures || (this.structures = []), this.saveStructures && (this.saveShared = this.saveStructures);
|
|
696
716
|
let v, C, F = e.sharedValues, T;
|
|
@@ -702,55 +722,55 @@ var De, lt, we = typeof globalThis == "object" && globalThis.Buffer, fe = typeof
|
|
|
702
722
|
this.mapEncode = function(i, w) {
|
|
703
723
|
return this._keyMap && !this._mapped && i.constructor.name === "Array" && (i = i.map((c) => this.encodeKeys(c))), this.encode(i, w);
|
|
704
724
|
}, this.encode = function(i, w) {
|
|
705
|
-
if (
|
|
706
|
-
if (
|
|
725
|
+
if (s || (s = new Se(8192), k = new DataView(s.buffer, 0, 8192), r = 0), H = s.length - 10, H - r < 2048 ? (s = new Se(s.length), k = new DataView(s.buffer, 0, s.length), H = s.length - 10, r = 0) : w === 512 && (r = r + 7 & 2147483640), t = r, y.useSelfDescribedHeader && (k.setUint32(r, 3654940416), r += 3), o = y.structuredClone ? /* @__PURE__ */ new Map() : null, y.bundleStrings && typeof i != "string" ? (_ = [], _.size = 1 / 0) : _ = null, n = y.structures, n) {
|
|
726
|
+
if (n.uninitialized) {
|
|
707
727
|
let d = y.getShared() || {};
|
|
708
|
-
y.structures =
|
|
728
|
+
y.structures = n = d.structures || [], y.sharedVersion = d.version;
|
|
709
729
|
let u = y.sharedValues = d.packedValues;
|
|
710
730
|
if (u) {
|
|
711
731
|
T = {};
|
|
712
732
|
for (let g = 0, b = u.length; g < b; g++) T[u[g]] = g;
|
|
713
733
|
}
|
|
714
734
|
}
|
|
715
|
-
let c =
|
|
716
|
-
if (c > S && !x && (c = S), !
|
|
717
|
-
|
|
735
|
+
let c = n.length;
|
|
736
|
+
if (c > S && !x && (c = S), !n.transitions) {
|
|
737
|
+
n.transitions = /* @__PURE__ */ Object.create(null);
|
|
718
738
|
for (let d = 0; d < c; d++) {
|
|
719
|
-
let u =
|
|
739
|
+
let u = n[d];
|
|
720
740
|
if (!u) continue;
|
|
721
|
-
let g, b =
|
|
741
|
+
let g, b = n.transitions;
|
|
722
742
|
for (let m = 0, A = u.length; m < A; m++) {
|
|
723
743
|
b[j] === void 0 && (b[j] = d);
|
|
724
|
-
let
|
|
725
|
-
g = b[
|
|
744
|
+
let I = u[m];
|
|
745
|
+
g = b[I], g || (g = b[I] = /* @__PURE__ */ Object.create(null)), b = g;
|
|
726
746
|
}
|
|
727
747
|
b[j] = d | 1048576;
|
|
728
748
|
}
|
|
729
749
|
}
|
|
730
|
-
x || (
|
|
750
|
+
x || (n.nextId = c);
|
|
731
751
|
}
|
|
732
|
-
if (a && (a = !1), l =
|
|
752
|
+
if (a && (a = !1), l = n || [], C = T, e.pack) {
|
|
733
753
|
let c = /* @__PURE__ */ new Map();
|
|
734
754
|
if (c.values = [], c.encoder = y, c.maxValues = e.maxPrivatePackedValues || (T ? 16 : 1 / 0), c.objectMap = T || !1, c.samplingPackedValues = v, he(i, c), c.values.length > 0) {
|
|
735
|
-
|
|
755
|
+
s[r++] = 216, s[r++] = 51, J(4);
|
|
736
756
|
let d = c.values;
|
|
737
|
-
|
|
757
|
+
M(d), J(0), J(0), C = Object.create(T || null);
|
|
738
758
|
for (let u = 0, g = d.length; u < g; u++) C[d[u]] = u;
|
|
739
759
|
}
|
|
740
760
|
}
|
|
741
761
|
Ae = w & Oe;
|
|
742
762
|
try {
|
|
743
763
|
if (Ae) return;
|
|
744
|
-
if (
|
|
745
|
-
r +=
|
|
746
|
-
let c = Ut(
|
|
747
|
-
return
|
|
764
|
+
if (M(i), _ && Xe(t, M), y.offset = r, o && o.idsToInsert) {
|
|
765
|
+
r += o.idsToInsert.length * 2, r > H && X(r), y.offset = r;
|
|
766
|
+
let c = Ut(s.subarray(t, r), o.idsToInsert);
|
|
767
|
+
return o = null, c;
|
|
748
768
|
}
|
|
749
|
-
return w & 512 ? (
|
|
769
|
+
return w & 512 ? (s.start = t, s.end = r, s) : s.subarray(t, r);
|
|
750
770
|
} finally {
|
|
751
|
-
if (
|
|
752
|
-
if (oe < 10 && oe++,
|
|
753
|
-
|
|
771
|
+
if (n) {
|
|
772
|
+
if (oe < 10 && oe++, n.length > S && (n.length = S), ge > 1e4)
|
|
773
|
+
n.transitions = null, oe = 0, ge = 0, L.length > 0 && (L = []);
|
|
754
774
|
else if (L.length > 0 && !x) {
|
|
755
775
|
for (let c = 0, d = L.length; c < d; c++) L[c][j] = void 0;
|
|
756
776
|
L = [];
|
|
@@ -758,7 +778,7 @@ var De, lt, we = typeof globalThis == "object" && globalThis.Buffer, fe = typeof
|
|
|
758
778
|
}
|
|
759
779
|
if (a && y.saveShared) {
|
|
760
780
|
y.structures.length > S && (y.structures = y.structures.slice(0, S));
|
|
761
|
-
let c =
|
|
781
|
+
let c = s.subarray(t, r);
|
|
762
782
|
return y.updateSharedData() === !1 ? y.encode(i) : c;
|
|
763
783
|
}
|
|
764
784
|
w & 1024 && (r = t);
|
|
@@ -770,14 +790,14 @@ var De, lt, we = typeof globalThis == "object" && globalThis.Buffer, fe = typeof
|
|
|
770
790
|
for (; this.saveShared && this.updateSharedData() === !1; ) ;
|
|
771
791
|
v = null;
|
|
772
792
|
});
|
|
773
|
-
const
|
|
774
|
-
r > H && (
|
|
793
|
+
const M = (i) => {
|
|
794
|
+
r > H && (s = X(r));
|
|
775
795
|
var w = typeof i, c;
|
|
776
796
|
if (w === "string") {
|
|
777
797
|
if (C) {
|
|
778
798
|
let b = C[i];
|
|
779
799
|
if (b >= 0) {
|
|
780
|
-
b < 16 ?
|
|
800
|
+
b < 16 ? s[r++] = b + 224 : (s[r++] = 198, b & 1 ? M(15 - b >> 1) : M(b - 16 >> 1));
|
|
781
801
|
return;
|
|
782
802
|
} else if (v && !e.pack) {
|
|
783
803
|
let m = v.get(i);
|
|
@@ -788,102 +808,106 @@ var De, lt, we = typeof globalThis == "object" && globalThis.Buffer, fe = typeof
|
|
|
788
808
|
if (_ && d >= 4 && d < 1024) {
|
|
789
809
|
if ((_.size += d) > Et) {
|
|
790
810
|
let m, A = (_[0] ? _[0].length * 3 + _[1].length : 0) + 10;
|
|
791
|
-
r + A > H && (
|
|
811
|
+
r + A > H && (s = X(r + A)), s[r++] = 217, s[r++] = 223, s[r++] = 249, s[r++] = _.position ? 132 : 130, s[r++] = 26, m = r - t, r += 4, _.position && Xe(t, M), _ = ["", ""], _.size = 0, _.position = m;
|
|
792
812
|
}
|
|
793
813
|
let b = Ot.test(i);
|
|
794
|
-
_[b ? 0 : 1] += i,
|
|
814
|
+
_[b ? 0 : 1] += i, s[r++] = b ? 206 : 207, M(d);
|
|
795
815
|
return;
|
|
796
816
|
}
|
|
797
817
|
let u;
|
|
798
818
|
d < 32 ? u = 1 : d < 256 ? u = 2 : d < 65536 ? u = 3 : u = 5;
|
|
799
819
|
let g = d * 3;
|
|
800
|
-
if (r + g > H && (
|
|
801
|
-
let b, m, A,
|
|
820
|
+
if (r + g > H && (s = X(r + g)), d < 64 || !h) {
|
|
821
|
+
let b, m, A, I = r + u;
|
|
802
822
|
for (b = 0; b < d; b++)
|
|
803
|
-
m = i.charCodeAt(b), m < 128 ?
|
|
804
|
-
c =
|
|
823
|
+
m = i.charCodeAt(b), m < 128 ? s[I++] = m : m < 2048 ? (s[I++] = m >> 6 | 192, s[I++] = m & 63 | 128) : (m & 64512) === 55296 && ((A = i.charCodeAt(b + 1)) & 64512) === 56320 ? (m = 65536 + ((m & 1023) << 10) + (A & 1023), b++, s[I++] = m >> 18 | 240, s[I++] = m >> 12 & 63 | 128, s[I++] = m >> 6 & 63 | 128, s[I++] = m & 63 | 128) : (s[I++] = m >> 12 | 224, s[I++] = m >> 6 & 63 | 128, s[I++] = m & 63 | 128);
|
|
824
|
+
c = I - r - u;
|
|
805
825
|
} else c = h(i, r + u, g);
|
|
806
|
-
c < 24 ?
|
|
807
|
-
} else if (w === "number")
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
let
|
|
816
|
-
if (d
|
|
817
|
-
r
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
if (f) {
|
|
826
|
-
let u = f.get(i);
|
|
827
|
-
if (u) {
|
|
828
|
-
if (n[r++] = 216, n[r++] = 29, n[r++] = 25, !u.references) {
|
|
829
|
-
let g = f.idsToInsert || (f.idsToInsert = []);
|
|
830
|
-
u.references = [], g.push(u);
|
|
831
|
-
}
|
|
832
|
-
u.references.push(r - t), r += 2;
|
|
833
|
-
return;
|
|
834
|
-
} else f.set(i, { offset: r - t });
|
|
826
|
+
c < 24 ? s[r++] = 96 | c : c < 256 ? (u < 2 && s.copyWithin(r + 2, r + 1, r + 1 + c), s[r++] = 120, s[r++] = c) : c < 65536 ? (u < 3 && s.copyWithin(r + 3, r + 2, r + 2 + c), s[r++] = 121, s[r++] = c >> 8, s[r++] = c & 255) : (u < 5 && s.copyWithin(r + 5, r + 3, r + 3 + c), s[r++] = 122, k.setUint32(r, c), r += 4), r += c;
|
|
827
|
+
} else if (w === "number")
|
|
828
|
+
if (!this.alwaysUseFloat && i >>> 0 === i)
|
|
829
|
+
i < 24 ? s[r++] = i : i < 256 ? (s[r++] = 24, s[r++] = i) : i < 65536 ? (s[r++] = 25, s[r++] = i >> 8, s[r++] = i & 255) : (s[r++] = 26, k.setUint32(r, i), r += 4);
|
|
830
|
+
else if (!this.alwaysUseFloat && i >> 0 === i)
|
|
831
|
+
i >= -24 ? s[r++] = 31 - i : i >= -256 ? (s[r++] = 56, s[r++] = ~i) : i >= -65536 ? (s[r++] = 57, k.setUint16(r, ~i), r += 2) : (s[r++] = 58, k.setUint32(r, ~i), r += 4);
|
|
832
|
+
else if (!this.alwaysUseFloat && i < 0 && i >= -4294967296 && Math.floor(i) === i)
|
|
833
|
+
s[r++] = 58, k.setUint32(r, -1 - i), r += 4;
|
|
834
|
+
else {
|
|
835
|
+
let d;
|
|
836
|
+
if ((d = this.useFloat32) > 0 && i < 4294967296 && i >= -2147483648) {
|
|
837
|
+
s[r++] = 250, k.setFloat32(r, i);
|
|
838
|
+
let u;
|
|
839
|
+
if (d < 4 || (u = i * Fe[(s[r] & 127) << 1 | s[r + 1] >> 7]) >> 0 === u) {
|
|
840
|
+
r += 4;
|
|
841
|
+
return;
|
|
842
|
+
} else r--;
|
|
843
|
+
}
|
|
844
|
+
s[r++] = 251, k.setFloat64(r, i), r += 8;
|
|
835
845
|
}
|
|
836
|
-
|
|
837
|
-
if (
|
|
838
|
-
this.skipFunction === !0 && (i = Object.fromEntries([...Object.keys(i).filter((u) => typeof i[u] != "function").map((u) => [u, i[u]])])), be(i);
|
|
839
|
-
else if (d === Array) {
|
|
840
|
-
c = i.length, c < 24 ? n[r++] = 128 | c : J(c);
|
|
841
|
-
for (let u = 0; u < c; u++) I(i[u]);
|
|
842
|
-
} else if (d === Map)
|
|
843
|
-
if ((this.mapsAsObjects ? this.useTag259ForMaps !== !1 : this.useTag259ForMaps) && (n[r++] = 217, n[r++] = 1, n[r++] = 3), c = i.size, c < 24 ? n[r++] = 160 | c : c < 256 ? (n[r++] = 184, n[r++] = c) : c < 65536 ? (n[r++] = 185, n[r++] = c >> 8, n[r++] = c & 255) : (n[r++] = 186, U.setUint32(r, c), r += 4), y.keyMap) for (let [u, g] of i)
|
|
844
|
-
I(y.encodeKey(u)), I(g);
|
|
845
|
-
else for (let [u, g] of i)
|
|
846
|
-
I(u), I(g);
|
|
846
|
+
else if (w === "object")
|
|
847
|
+
if (!i) s[r++] = 246;
|
|
847
848
|
else {
|
|
848
|
-
|
|
849
|
-
let
|
|
850
|
-
if (
|
|
851
|
-
|
|
852
|
-
|
|
849
|
+
if (o) {
|
|
850
|
+
let u = o.get(i);
|
|
851
|
+
if (u) {
|
|
852
|
+
if (s[r++] = 216, s[r++] = 29, s[r++] = 25, !u.references) {
|
|
853
|
+
let g = o.idsToInsert || (o.idsToInsert = []);
|
|
854
|
+
u.references = [], g.push(u);
|
|
855
|
+
}
|
|
856
|
+
u.references.push(r - t), r += 2;
|
|
853
857
|
return;
|
|
854
|
-
}
|
|
858
|
+
} else o.set(i, { offset: r - t });
|
|
855
859
|
}
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
860
|
+
let d = i.constructor;
|
|
861
|
+
if (d === Object)
|
|
862
|
+
this.skipFunction === !0 && (i = Object.fromEntries([...Object.keys(i).filter((u) => typeof i[u] != "function").map((u) => [u, i[u]])])), be(i);
|
|
863
|
+
else if (d === Array) {
|
|
864
|
+
c = i.length, c < 24 ? s[r++] = 128 | c : J(c);
|
|
865
|
+
for (let u = 0; u < c; u++) M(i[u]);
|
|
866
|
+
} else if (d === Map)
|
|
867
|
+
if ((this.mapsAsObjects ? this.useTag259ForMaps !== !1 : this.useTag259ForMaps) && (s[r++] = 217, s[r++] = 1, s[r++] = 3), c = i.size, c < 24 ? s[r++] = 160 | c : c < 256 ? (s[r++] = 184, s[r++] = c) : c < 65536 ? (s[r++] = 185, s[r++] = c >> 8, s[r++] = c & 255) : (s[r++] = 186, k.setUint32(r, c), r += 4), y.keyMap) for (let [u, g] of i)
|
|
868
|
+
M(y.encodeKey(u)), M(g);
|
|
869
|
+
else for (let [u, g] of i)
|
|
870
|
+
M(u), M(g);
|
|
871
|
+
else {
|
|
872
|
+
for (let u = 0, g = De.length; u < g; u++) {
|
|
873
|
+
let b = lt[u];
|
|
874
|
+
if (i instanceof b) {
|
|
875
|
+
let m = De[u], A = m.tag;
|
|
876
|
+
A == null && (A = m.getTag && m.getTag.call(this, i)), A < 24 ? s[r++] = 192 | A : A < 256 ? (s[r++] = 216, s[r++] = A) : A < 65536 ? (s[r++] = 217, s[r++] = A >> 8, s[r++] = A & 255) : A > -1 && (s[r++] = 218, k.setUint32(r, A), r += 4), m.encode.call(this, i, M, X);
|
|
877
|
+
return;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
if (i[Symbol.iterator]) {
|
|
881
|
+
if (Ae) {
|
|
882
|
+
let u = /* @__PURE__ */ new Error("Iterable should be serialized as iterator");
|
|
883
|
+
throw u.iteratorNotHandled = !0, u;
|
|
884
|
+
}
|
|
885
|
+
s[r++] = 159;
|
|
886
|
+
for (let u of i) M(u);
|
|
887
|
+
s[r++] = 255;
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
if (i[Symbol.asyncIterator] || Ee(i)) {
|
|
891
|
+
let u = /* @__PURE__ */ new Error("Iterable/blob should be serialized as iterator");
|
|
859
892
|
throw u.iteratorNotHandled = !0, u;
|
|
860
893
|
}
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
if (i[Symbol.asyncIterator] || Ee(i)) {
|
|
867
|
-
let u = /* @__PURE__ */ new Error("Iterable/blob should be serialized as iterator");
|
|
868
|
-
throw u.iteratorNotHandled = !0, u;
|
|
869
|
-
}
|
|
870
|
-
if (this.useToJSON && i.toJSON) {
|
|
871
|
-
const u = i.toJSON();
|
|
872
|
-
if (u !== i) return I(u);
|
|
894
|
+
if (this.useToJSON && i.toJSON) {
|
|
895
|
+
const u = i.toJSON();
|
|
896
|
+
if (u !== i) return M(u);
|
|
897
|
+
}
|
|
898
|
+
be(i);
|
|
873
899
|
}
|
|
874
|
-
be(i);
|
|
875
900
|
}
|
|
876
|
-
|
|
877
|
-
else if (w === "boolean") n[r++] = i ? 245 : 244;
|
|
901
|
+
else if (w === "boolean") s[r++] = i ? 245 : 244;
|
|
878
902
|
else if (w === "bigint") {
|
|
879
903
|
if (i < BigInt(1) << BigInt(64) && i >= 0)
|
|
880
|
-
|
|
904
|
+
s[r++] = 27, k.setBigUint64(r, i);
|
|
881
905
|
else if (i > -(BigInt(1) << BigInt(64)) && i < 0)
|
|
882
|
-
|
|
906
|
+
s[r++] = 59, k.setBigUint64(r, -i - BigInt(1));
|
|
883
907
|
else if (this.largeBigIntToFloat)
|
|
884
|
-
|
|
908
|
+
s[r++] = 251, k.setFloat64(r, Number(i));
|
|
885
909
|
else {
|
|
886
|
-
i >= BigInt(0) ?
|
|
910
|
+
i >= BigInt(0) ? s[r++] = 194 : (s[r++] = 195, i = BigInt(-1) - i);
|
|
887
911
|
let d = [];
|
|
888
912
|
for (; i; )
|
|
889
913
|
d.push(Number(i & BigInt(255))), i >>= BigInt(8);
|
|
@@ -891,55 +915,55 @@ var De, lt, we = typeof globalThis == "object" && globalThis.Buffer, fe = typeof
|
|
|
891
915
|
return;
|
|
892
916
|
}
|
|
893
917
|
r += 8;
|
|
894
|
-
} else if (w === "undefined")
|
|
918
|
+
} else if (w === "undefined") s[r++] = 247;
|
|
895
919
|
else throw new Error("Unknown type: " + w);
|
|
896
920
|
}, be = this.useRecords === !1 ? this.variableMapSize ? (i) => {
|
|
897
921
|
let w = Object.keys(i), c = Object.values(i), d = w.length;
|
|
898
|
-
if (d < 24 ?
|
|
899
|
-
|
|
922
|
+
if (d < 24 ? s[r++] = 160 | d : d < 256 ? (s[r++] = 184, s[r++] = d) : d < 65536 ? (s[r++] = 185, s[r++] = d >> 8, s[r++] = d & 255) : (s[r++] = 186, k.setUint32(r, d), r += 4), y.keyMap) for (let u = 0; u < d; u++)
|
|
923
|
+
M(y.encodeKey(w[u])), M(c[u]);
|
|
900
924
|
else for (let u = 0; u < d; u++)
|
|
901
|
-
|
|
925
|
+
M(w[u]), M(c[u]);
|
|
902
926
|
} : (i) => {
|
|
903
|
-
|
|
927
|
+
s[r++] = 185;
|
|
904
928
|
let w = r - t;
|
|
905
929
|
r += 2;
|
|
906
930
|
let c = 0;
|
|
907
931
|
if (y.keyMap)
|
|
908
|
-
for (let d in i) (typeof i.hasOwnProperty != "function" || i.hasOwnProperty(d)) && (
|
|
909
|
-
else for (let d in i) (typeof i.hasOwnProperty != "function" || i.hasOwnProperty(d)) && (
|
|
910
|
-
|
|
932
|
+
for (let d in i) (typeof i.hasOwnProperty != "function" || i.hasOwnProperty(d)) && (M(y.encodeKey(d)), M(i[d]), c++);
|
|
933
|
+
else for (let d in i) (typeof i.hasOwnProperty != "function" || i.hasOwnProperty(d)) && (M(d), M(i[d]), c++);
|
|
934
|
+
s[w++ + t] = c >> 8, s[w + t] = c & 255;
|
|
911
935
|
} : (i, w) => {
|
|
912
936
|
let c, d = l.transitions || (l.transitions = /* @__PURE__ */ Object.create(null)), u = 0, g = 0, b, m;
|
|
913
937
|
if (this.keyMap) {
|
|
914
|
-
m = Object.keys(i).map((
|
|
915
|
-
for (let
|
|
916
|
-
let Ke = m[
|
|
938
|
+
m = Object.keys(i).map((I) => this.encodeKey(I)), g = m.length;
|
|
939
|
+
for (let I = 0; I < g; I++) {
|
|
940
|
+
let Ke = m[I];
|
|
917
941
|
c = d[Ke], c || (c = d[Ke] = /* @__PURE__ */ Object.create(null), u++), d = c;
|
|
918
942
|
}
|
|
919
|
-
} else for (let
|
|
943
|
+
} else for (let I in i) (typeof i.hasOwnProperty != "function" || i.hasOwnProperty(I)) && (c = d[I], c || (d[j] & 1048576 && (b = d[j] & 65535), c = d[I] = /* @__PURE__ */ Object.create(null), u++), d = c, g++);
|
|
920
944
|
let A = d[j];
|
|
921
945
|
if (A !== void 0)
|
|
922
|
-
A &= 65535,
|
|
946
|
+
A &= 65535, s[r++] = 217, s[r++] = A >> 8 | 224, s[r++] = A & 255;
|
|
923
947
|
else if (m || (m = d.__keys__ || (d.__keys__ = Object.keys(i))), b === void 0 ? (A = l.nextId++, A || (A = 0, l.nextId = 1), A >= qe && (l.nextId = (A = S) + 1)) : A = b, l[A] = m, A < S) {
|
|
924
|
-
|
|
925
|
-
for (let
|
|
926
|
-
(d[j] === void 0 || d[j] & 1048576) && (d[j] = A), d = d[m[
|
|
948
|
+
s[r++] = 217, s[r++] = A >> 8 | 224, s[r++] = A & 255, d = l.transitions;
|
|
949
|
+
for (let I = 0; I < g; I++)
|
|
950
|
+
(d[j] === void 0 || d[j] & 1048576) && (d[j] = A), d = d[m[I]];
|
|
927
951
|
d[j] = A | 1048576, a = !0;
|
|
928
952
|
} else {
|
|
929
|
-
if (d[j] = A,
|
|
930
|
-
for (let
|
|
953
|
+
if (d[j] = A, k.setUint32(r, 3655335680), r += 3, u && (ge += oe * u), L.length >= qe - S && (L.shift()[j] = void 0), L.push(d), J(g + 2), M(57344 + A), M(m), w) return;
|
|
954
|
+
for (let I in i) (typeof i.hasOwnProperty != "function" || i.hasOwnProperty(I)) && M(i[I]);
|
|
931
955
|
return;
|
|
932
956
|
}
|
|
933
|
-
if (g < 24 ?
|
|
934
|
-
for (let
|
|
957
|
+
if (g < 24 ? s[r++] = 128 | g : J(g), !w)
|
|
958
|
+
for (let I in i) (typeof i.hasOwnProperty != "function" || i.hasOwnProperty(I)) && M(i[I]);
|
|
935
959
|
}, X = (i) => {
|
|
936
960
|
let w;
|
|
937
961
|
if (i > 16777216) {
|
|
938
962
|
if (i - t > Ge) throw new Error("Encoded buffer would be larger than maximum buffer size");
|
|
939
963
|
w = Math.min(Ge, Math.round(Math.max((i - t) * (i > 67108864 ? 1.25 : 2), 4194304) / 4096) * 4096);
|
|
940
|
-
} else w = (Math.max(i - t << 2,
|
|
964
|
+
} else w = (Math.max(i - t << 2, s.length - 1) >> 12) + 1 << 12;
|
|
941
965
|
let c = new Se(w);
|
|
942
|
-
return
|
|
966
|
+
return k = new DataView(c.buffer, 0, w), s.copy ? s.copy(c, 0, t, i) : c.set(s.slice(t, i)), r -= t, t = 0, H = c.length - 10, s = c;
|
|
943
967
|
};
|
|
944
968
|
let Y = 100, Ce = 1e3;
|
|
945
969
|
this.encodeAsIterable = function(i, w) {
|
|
@@ -954,26 +978,26 @@ var De, lt, we = typeof globalThis == "object" && globalThis.Buffer, fe = typeof
|
|
|
954
978
|
u ? be(i, !0) : Ze(Object.keys(i).length, 160);
|
|
955
979
|
for (let g in i) {
|
|
956
980
|
let b = i[g];
|
|
957
|
-
u ||
|
|
981
|
+
u || M(g), b && typeof b == "object" ? w[g] ? yield* Q(b, w[g]) : yield* me(b, w, g) : M(b);
|
|
958
982
|
}
|
|
959
983
|
} else if (d === Array) {
|
|
960
984
|
let u = i.length;
|
|
961
985
|
J(u);
|
|
962
986
|
for (let g = 0; g < u; g++) {
|
|
963
987
|
let b = i[g];
|
|
964
|
-
b && (typeof b == "object" || r - t > Y) ? w.element ? yield* Q(b, w.element) : yield* me(b, w, "element") :
|
|
988
|
+
b && (typeof b == "object" || r - t > Y) ? w.element ? yield* Q(b, w.element) : yield* me(b, w, "element") : M(b);
|
|
965
989
|
}
|
|
966
990
|
} else if (i[Symbol.iterator] && !i.buffer) {
|
|
967
|
-
|
|
968
|
-
for (let u of i) u && (typeof u == "object" || r - t > Y) ? w.element ? yield* Q(u, w.element) : yield* me(u, w, "element") :
|
|
969
|
-
|
|
970
|
-
} else Ee(i) ? (Ze(i.size, 64), yield
|
|
971
|
-
c && r > t ? yield
|
|
991
|
+
s[r++] = 159;
|
|
992
|
+
for (let u of i) u && (typeof u == "object" || r - t > Y) ? w.element ? yield* Q(u, w.element) : yield* me(u, w, "element") : M(u);
|
|
993
|
+
s[r++] = 255;
|
|
994
|
+
} else Ee(i) ? (Ze(i.size, 64), yield s.subarray(t, r), yield i, ie()) : i[Symbol.asyncIterator] ? (s[r++] = 159, yield s.subarray(t, r), yield i, ie(), s[r++] = 255) : M(i);
|
|
995
|
+
c && r > t ? yield s.subarray(t, r) : r - t > Y && (yield s.subarray(t, r), ie());
|
|
972
996
|
}
|
|
973
997
|
function* me(i, w, c) {
|
|
974
998
|
let d = r - t;
|
|
975
999
|
try {
|
|
976
|
-
|
|
1000
|
+
M(i), r - t > Y && (yield s.subarray(t, r), ie());
|
|
977
1001
|
} catch (u) {
|
|
978
1002
|
if (u.iteratorNotHandled)
|
|
979
1003
|
w[c] = {}, r = t + d, yield* Q.call(this, i, w[c]);
|
|
@@ -1000,7 +1024,7 @@ var De, lt, we = typeof globalThis == "object" && globalThis.Buffer, fe = typeof
|
|
|
1000
1024
|
}
|
|
1001
1025
|
}
|
|
1002
1026
|
useBuffer(e) {
|
|
1003
|
-
|
|
1027
|
+
s = e, k = new DataView(s.buffer, s.byteOffset, s.byteLength), r = 0;
|
|
1004
1028
|
}
|
|
1005
1029
|
clearSharedData() {
|
|
1006
1030
|
this.structures && (this.structures = []), this.sharedValues && (this.sharedValues = void 0);
|
|
@@ -1008,25 +1032,25 @@ var De, lt, we = typeof globalThis == "object" && globalThis.Buffer, fe = typeof
|
|
|
1008
1032
|
updateSharedData() {
|
|
1009
1033
|
let e = this.sharedVersion || 0;
|
|
1010
1034
|
this.sharedVersion = e + 1;
|
|
1011
|
-
let t = this.structures.slice(0),
|
|
1012
|
-
return a === !1 ? (
|
|
1035
|
+
let t = this.structures.slice(0), n = new at(t, this.sharedValues, this.sharedVersion), a = this.saveShared(n, (l) => (l && l.version || 0) == e);
|
|
1036
|
+
return a === !1 ? (n = this.getShared() || {}, this.structures = n.structures || [], this.sharedValues = n.packedValues, this.sharedVersion = n.version, this.structures.nextId = this.structures.length) : t.forEach((l, o) => this.structures[o] = l), a;
|
|
1013
1037
|
}
|
|
1014
1038
|
};
|
|
1015
1039
|
function Ze(e, t) {
|
|
1016
|
-
e < 24 ?
|
|
1040
|
+
e < 24 ? s[r++] = t | e : e < 256 ? (s[r++] = t | 24, s[r++] = e) : e < 65536 ? (s[r++] = t | 25, s[r++] = e >> 8, s[r++] = e & 255) : (s[r++] = t | 26, k.setUint32(r, e), r += 4);
|
|
1017
1041
|
}
|
|
1018
1042
|
var at = class {
|
|
1019
|
-
constructor(e, t,
|
|
1020
|
-
this.structures = e, this.packedValues = t, this.version =
|
|
1043
|
+
constructor(e, t, n) {
|
|
1044
|
+
this.structures = e, this.packedValues = t, this.version = n;
|
|
1021
1045
|
}
|
|
1022
1046
|
};
|
|
1023
1047
|
function J(e) {
|
|
1024
|
-
e < 24 ?
|
|
1048
|
+
e < 24 ? s[r++] = 128 | e : e < 256 ? (s[r++] = 152, s[r++] = e) : e < 65536 ? (s[r++] = 153, s[r++] = e >> 8, s[r++] = e & 255) : (s[r++] = 154, k.setUint32(r, e), r += 4);
|
|
1025
1049
|
}
|
|
1026
|
-
var
|
|
1050
|
+
var Mt = typeof Blob > "u" ? function() {
|
|
1027
1051
|
} : Blob;
|
|
1028
1052
|
function Ee(e) {
|
|
1029
|
-
if (e instanceof
|
|
1053
|
+
if (e instanceof Mt) return !0;
|
|
1030
1054
|
let t = e[Symbol.toStringTag];
|
|
1031
1055
|
return t === "Blob" || t === "File";
|
|
1032
1056
|
}
|
|
@@ -1045,17 +1069,18 @@ function he(e, t) {
|
|
|
1045
1069
|
}
|
|
1046
1070
|
break;
|
|
1047
1071
|
case "object":
|
|
1048
|
-
if (e)
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1072
|
+
if (e)
|
|
1073
|
+
if (e instanceof Array) for (let a = 0, l = e.length; a < l; a++) he(e[a], t);
|
|
1074
|
+
else {
|
|
1075
|
+
let a = !t.encoder.useRecords;
|
|
1076
|
+
for (var n in e) e.hasOwnProperty(n) && (a && he(n, t), he(e[n], t));
|
|
1077
|
+
}
|
|
1053
1078
|
break;
|
|
1054
1079
|
case "function":
|
|
1055
1080
|
console.log(e);
|
|
1056
1081
|
}
|
|
1057
1082
|
}
|
|
1058
|
-
var
|
|
1083
|
+
var kt = new Uint8Array(new Uint16Array([1]).buffer)[0] == 1;
|
|
1059
1084
|
lt = [
|
|
1060
1085
|
Date,
|
|
1061
1086
|
Set,
|
|
@@ -1082,8 +1107,8 @@ De = [
|
|
|
1082
1107
|
{
|
|
1083
1108
|
tag: 1,
|
|
1084
1109
|
encode(e, t) {
|
|
1085
|
-
let
|
|
1086
|
-
(this.useTimestamp32 || e.getMilliseconds() === 0) &&
|
|
1110
|
+
let n = e.getTime() / 1e3;
|
|
1111
|
+
(this.useTimestamp32 || e.getMilliseconds() === 0) && n >= 0 && n < 4294967296 ? (s[r++] = 26, k.setUint32(r, n), r += 4) : (s[r++] = 251, k.setFloat64(r, n), r += 8);
|
|
1087
1112
|
}
|
|
1088
1113
|
},
|
|
1089
1114
|
{
|
|
@@ -1116,16 +1141,16 @@ De = [
|
|
|
1116
1141
|
t(e.value);
|
|
1117
1142
|
}
|
|
1118
1143
|
},
|
|
1119
|
-
{ encode(e, t,
|
|
1120
|
-
Pe(e,
|
|
1144
|
+
{ encode(e, t, n) {
|
|
1145
|
+
Pe(e, n);
|
|
1121
1146
|
} },
|
|
1122
1147
|
{
|
|
1123
1148
|
getTag(e) {
|
|
1124
1149
|
if (e.constructor === Uint8Array && (this.tagUint8Array || fe && this.tagUint8Array !== !1))
|
|
1125
1150
|
return 64;
|
|
1126
1151
|
},
|
|
1127
|
-
encode(e, t,
|
|
1128
|
-
Pe(e,
|
|
1152
|
+
encode(e, t, n) {
|
|
1153
|
+
Pe(e, n);
|
|
1129
1154
|
}
|
|
1130
1155
|
},
|
|
1131
1156
|
$(68, 1),
|
|
@@ -1139,56 +1164,56 @@ De = [
|
|
|
1139
1164
|
$(85, 4),
|
|
1140
1165
|
$(86, 8),
|
|
1141
1166
|
{ encode(e, t) {
|
|
1142
|
-
let
|
|
1143
|
-
if (
|
|
1144
|
-
|
|
1145
|
-
let l =
|
|
1167
|
+
let n = e.packedValues || [], a = e.structures || [];
|
|
1168
|
+
if (n.values.length > 0) {
|
|
1169
|
+
s[r++] = 216, s[r++] = 51, J(4);
|
|
1170
|
+
let l = n.values;
|
|
1146
1171
|
t(l), J(0), J(0), packedObjectMap = Object.create(sharedPackedObjectMap || null);
|
|
1147
|
-
for (let
|
|
1172
|
+
for (let o = 0, h = l.length; o < h; o++) packedObjectMap[l[o]] = o;
|
|
1148
1173
|
}
|
|
1149
1174
|
if (a) {
|
|
1150
|
-
|
|
1175
|
+
k.setUint32(r, 3655335424), r += 3;
|
|
1151
1176
|
let l = a.slice(0);
|
|
1152
1177
|
l.unshift(57344), l.push(new Z(e.version, 1399353956)), t(l);
|
|
1153
1178
|
} else t(new Z(e.version, 1399353956));
|
|
1154
1179
|
} }
|
|
1155
1180
|
];
|
|
1156
1181
|
function $(e, t) {
|
|
1157
|
-
return !
|
|
1182
|
+
return !kt && t > 1 && (e -= 4), {
|
|
1158
1183
|
tag: e,
|
|
1159
1184
|
encode: function(a, l) {
|
|
1160
|
-
let
|
|
1161
|
-
l(fe ? we.from(y, h,
|
|
1185
|
+
let o = a.byteLength, h = a.byteOffset || 0, y = a.buffer || a;
|
|
1186
|
+
l(fe ? we.from(y, h, o) : new Uint8Array(y, h, o));
|
|
1162
1187
|
}
|
|
1163
1188
|
};
|
|
1164
1189
|
}
|
|
1165
1190
|
function Pe(e, t) {
|
|
1166
|
-
let
|
|
1167
|
-
|
|
1191
|
+
let n = e.byteLength;
|
|
1192
|
+
n < 24 ? s[r++] = 64 + n : n < 256 ? (s[r++] = 88, s[r++] = n) : n < 65536 ? (s[r++] = 89, s[r++] = n >> 8, s[r++] = n & 255) : (s[r++] = 90, k.setUint32(r, n), r += 4), r + n >= s.length && t(r + n), s.set(e.buffer ? e : new Uint8Array(e), r), r += n;
|
|
1168
1193
|
}
|
|
1169
1194
|
function Ut(e, t) {
|
|
1170
|
-
let
|
|
1171
|
-
t.sort((
|
|
1172
|
-
for (let
|
|
1173
|
-
let h = t[
|
|
1174
|
-
h.id =
|
|
1195
|
+
let n, a = t.length * 2, l = e.length - a;
|
|
1196
|
+
t.sort((o, h) => o.offset > h.offset ? 1 : -1);
|
|
1197
|
+
for (let o = 0; o < t.length; o++) {
|
|
1198
|
+
let h = t[o];
|
|
1199
|
+
h.id = o;
|
|
1175
1200
|
for (let y of h.references)
|
|
1176
|
-
e[y++] =
|
|
1201
|
+
e[y++] = o >> 8, e[y] = o & 255;
|
|
1177
1202
|
}
|
|
1178
|
-
for (;
|
|
1179
|
-
let
|
|
1180
|
-
e.copyWithin(
|
|
1181
|
-
let h =
|
|
1182
|
-
e[h++] = 216, e[h++] = 28, l =
|
|
1203
|
+
for (; n = t.pop(); ) {
|
|
1204
|
+
let o = n.offset;
|
|
1205
|
+
e.copyWithin(o + a, o, l), a -= 2;
|
|
1206
|
+
let h = o + a;
|
|
1207
|
+
e[h++] = 216, e[h++] = 28, l = o;
|
|
1183
1208
|
}
|
|
1184
1209
|
return e;
|
|
1185
1210
|
}
|
|
1186
1211
|
function Xe(e, t) {
|
|
1187
|
-
|
|
1188
|
-
let
|
|
1189
|
-
_ = null, t(
|
|
1212
|
+
k.setUint32(_.position + e, r - _.position - e + 1);
|
|
1213
|
+
let n = _;
|
|
1214
|
+
_ = null, t(n[0]), t(n[1]);
|
|
1190
1215
|
}
|
|
1191
|
-
var Ne = new
|
|
1216
|
+
var Ne = new It({ useRecords: !1 }), Bt = Ne.encode, Rt = Ne.encodeAsIterable, _t = Ne.encodeAsAsyncIterable, { NEVER: Dt, ALWAYS: Pt, DECIMAL_ROUND: Tt, DECIMAL_FIT: Ft } = At;
|
|
1192
1217
|
var Oe = 2048;
|
|
1193
1218
|
export {
|
|
1194
1219
|
vt as decode,
|