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