@harbour-enterprises/superdoc 0.9.33 → 0.10.2

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.
Files changed (34) hide show
  1. package/dist/chunks/index-8ZIOYegI.es.js +1676 -0
  2. package/dist/chunks/index-C4-w9MLl.cjs +1 -0
  3. package/dist/chunks/{index--PIRPKWt.cjs → index-ChNh-3hE.cjs} +1 -1
  4. package/dist/chunks/{index-B5GDfEJg.es.js → index-DlBXCtmW.es.js} +1 -1
  5. package/dist/chunks/{super-editor.es-B8noCvT1.es.js → super-editor.es-BJjuGvyp.es.js} +453 -465
  6. package/dist/chunks/{super-editor.es-y2QD_ueu.cjs → super-editor.es-BR6yWvHn.cjs} +40 -40
  7. package/dist/chunks/{url-BDmRlERW.es.js → url-B0oWkmAx.es.js} +1 -1
  8. package/dist/chunks/{url-C5DCBLAS.cjs → url-CzUL97Mg.cjs} +1 -1
  9. package/dist/chunks/xml-js-DLnxZypp.es.js +1764 -0
  10. package/dist/chunks/xml-js-zfoNze4t.cjs +10 -0
  11. package/dist/super-editor/chunks/{converter-CdhiEvSA.js → converter-C35FY5VQ.js} +4 -6
  12. package/dist/super-editor/chunks/{docx-zipper-Cb4eXMOp.js → docx-zipper-UI40aP31.js} +1 -1
  13. package/dist/super-editor/chunks/{editor-Czx51mKu.js → editor-CO6h1K8S.js} +302 -312
  14. package/dist/super-editor/chunks/{toolbar-BE-PZVKR.js → toolbar-CM60amWZ.js} +2 -2
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor.es.js +6 -6
  20. package/dist/super-editor/tests/e2e/test-app/vite.config.d.ts +1 -1
  21. package/dist/super-editor/toolbar.es.js +2 -2
  22. package/dist/super-editor.cjs +1 -1
  23. package/dist/super-editor.es.js +1 -1
  24. package/dist/superdoc.cjs +3 -3
  25. package/dist/superdoc.es.js +6 -6
  26. package/dist/superdoc.umd.js +878 -890
  27. package/dist/superdoc.umd.js.map +1 -1
  28. package/package.json +1 -1
  29. package/dist/chunks/index-Bq_aNm9n.es.js +0 -473
  30. package/dist/chunks/index-DrgTIkvI.cjs +0 -1
  31. package/dist/chunks/xml-js-DMX8C2aY.es.js +0 -2965
  32. package/dist/chunks/xml-js-DN6JJ8Mw.cjs +0 -10
  33. package/dist/super-editor/tests/e2e/test-app/dist/assets/index-DX0vnkoa.d.ts +0 -3
  34. package/dist/super-editor/tests/e2e/test-app/dist/assets/index-DX0vnkoa.d.ts.map +0 -1
@@ -1,2965 +0,0 @@
1
- import { p as U } from "./vue-BDbTsTMu.es.js";
2
- import { a as vn, d as bn, c as ue } from "./jszip-DSGi1sNe.es.js";
3
- var At = { exports: {} };
4
- typeof Object.create == "function" ? At.exports = function(t, r) {
5
- r && (t.super_ = r, t.prototype = Object.create(r.prototype, {
6
- constructor: {
7
- value: t,
8
- enumerable: !1,
9
- writable: !0,
10
- configurable: !0
11
- }
12
- }));
13
- } : At.exports = function(t, r) {
14
- if (r) {
15
- t.super_ = r;
16
- var o = function() {
17
- };
18
- o.prototype = r.prototype, t.prototype = new o(), t.prototype.constructor = t;
19
- }
20
- };
21
- var me = At.exports, It = { exports: {} }, ve = typeof Reflect == "object" ? Reflect : null, qt = ve && typeof ve.apply == "function" ? ve.apply : function(t, r, o) {
22
- return Function.prototype.apply.call(t, r, o);
23
- }, De;
24
- ve && typeof ve.ownKeys == "function" ? De = ve.ownKeys : Object.getOwnPropertySymbols ? De = function(t) {
25
- return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));
26
- } : De = function(t) {
27
- return Object.getOwnPropertyNames(t);
28
- };
29
- function wn(e) {
30
- console && console.warn && console.warn(e);
31
- }
32
- var jr = Number.isNaN || function(t) {
33
- return t !== t;
34
- };
35
- function G() {
36
- G.init.call(this);
37
- }
38
- It.exports = G;
39
- It.exports.once = En;
40
- G.EventEmitter = G;
41
- G.prototype._events = void 0;
42
- G.prototype._eventsCount = 0;
43
- G.prototype._maxListeners = void 0;
44
- var Gt = 10;
45
- function He(e) {
46
- if (typeof e != "function")
47
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e);
48
- }
49
- Object.defineProperty(G, "defaultMaxListeners", {
50
- enumerable: !0,
51
- get: function() {
52
- return Gt;
53
- },
54
- set: function(e) {
55
- if (typeof e != "number" || e < 0 || jr(e))
56
- throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + ".");
57
- Gt = e;
58
- }
59
- });
60
- G.init = function() {
61
- (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
62
- };
63
- G.prototype.setMaxListeners = function(t) {
64
- if (typeof t != "number" || t < 0 || jr(t))
65
- throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + ".");
66
- return this._maxListeners = t, this;
67
- };
68
- function Mr(e) {
69
- return e._maxListeners === void 0 ? G.defaultMaxListeners : e._maxListeners;
70
- }
71
- G.prototype.getMaxListeners = function() {
72
- return Mr(this);
73
- };
74
- G.prototype.emit = function(t) {
75
- for (var r = [], o = 1; o < arguments.length; o++) r.push(arguments[o]);
76
- var a = t === "error", d = this._events;
77
- if (d !== void 0)
78
- a = a && d.error === void 0;
79
- else if (!a)
80
- return !1;
81
- if (a) {
82
- var c;
83
- if (r.length > 0 && (c = r[0]), c instanceof Error)
84
- throw c;
85
- var m = new Error("Unhandled error." + (c ? " (" + c.message + ")" : ""));
86
- throw m.context = c, m;
87
- }
88
- var y = d[t];
89
- if (y === void 0)
90
- return !1;
91
- if (typeof y == "function")
92
- qt(y, this, r);
93
- else
94
- for (var E = y.length, L = Br(y, E), o = 0; o < E; ++o)
95
- qt(L[o], this, r);
96
- return !0;
97
- };
98
- function Lr(e, t, r, o) {
99
- var a, d, c;
100
- if (He(r), d = e._events, d === void 0 ? (d = e._events = /* @__PURE__ */ Object.create(null), e._eventsCount = 0) : (d.newListener !== void 0 && (e.emit(
101
- "newListener",
102
- t,
103
- r.listener ? r.listener : r
104
- ), d = e._events), c = d[t]), c === void 0)
105
- c = d[t] = r, ++e._eventsCount;
106
- else if (typeof c == "function" ? c = d[t] = o ? [r, c] : [c, r] : o ? c.unshift(r) : c.push(r), a = Mr(e), a > 0 && c.length > a && !c.warned) {
107
- c.warned = !0;
108
- var m = new Error("Possible EventEmitter memory leak detected. " + c.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
109
- m.name = "MaxListenersExceededWarning", m.emitter = e, m.type = t, m.count = c.length, wn(m);
110
- }
111
- return e;
112
- }
113
- G.prototype.addListener = function(t, r) {
114
- return Lr(this, t, r, !1);
115
- };
116
- G.prototype.on = G.prototype.addListener;
117
- G.prototype.prependListener = function(t, r) {
118
- return Lr(this, t, r, !0);
119
- };
120
- function mn() {
121
- if (!this.fired)
122
- return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
123
- }
124
- function Nr(e, t, r) {
125
- var o = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, a = mn.bind(o);
126
- return a.listener = r, o.wrapFn = a, a;
127
- }
128
- G.prototype.once = function(t, r) {
129
- return He(r), this.on(t, Nr(this, t, r)), this;
130
- };
131
- G.prototype.prependOnceListener = function(t, r) {
132
- return He(r), this.prependListener(t, Nr(this, t, r)), this;
133
- };
134
- G.prototype.removeListener = function(t, r) {
135
- var o, a, d, c, m;
136
- if (He(r), a = this._events, a === void 0)
137
- return this;
138
- if (o = a[t], o === void 0)
139
- return this;
140
- if (o === r || o.listener === r)
141
- --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete a[t], a.removeListener && this.emit("removeListener", t, o.listener || r));
142
- else if (typeof o != "function") {
143
- for (d = -1, c = o.length - 1; c >= 0; c--)
144
- if (o[c] === r || o[c].listener === r) {
145
- m = o[c].listener, d = c;
146
- break;
147
- }
148
- if (d < 0)
149
- return this;
150
- d === 0 ? o.shift() : _n(o, d), o.length === 1 && (a[t] = o[0]), a.removeListener !== void 0 && this.emit("removeListener", t, m || r);
151
- }
152
- return this;
153
- };
154
- G.prototype.off = G.prototype.removeListener;
155
- G.prototype.removeAllListeners = function(t) {
156
- var r, o, a;
157
- if (o = this._events, o === void 0)
158
- return this;
159
- if (o.removeListener === void 0)
160
- return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : o[t] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete o[t]), this;
161
- if (arguments.length === 0) {
162
- var d = Object.keys(o), c;
163
- for (a = 0; a < d.length; ++a)
164
- c = d[a], c !== "removeListener" && this.removeAllListeners(c);
165
- return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
166
- }
167
- if (r = o[t], typeof r == "function")
168
- this.removeListener(t, r);
169
- else if (r !== void 0)
170
- for (a = r.length - 1; a >= 0; a--)
171
- this.removeListener(t, r[a]);
172
- return this;
173
- };
174
- function Ir(e, t, r) {
175
- var o = e._events;
176
- if (o === void 0)
177
- return [];
178
- var a = o[t];
179
- return a === void 0 ? [] : typeof a == "function" ? r ? [a.listener || a] : [a] : r ? Sn(a) : Br(a, a.length);
180
- }
181
- G.prototype.listeners = function(t) {
182
- return Ir(this, t, !0);
183
- };
184
- G.prototype.rawListeners = function(t) {
185
- return Ir(this, t, !1);
186
- };
187
- G.listenerCount = function(e, t) {
188
- return typeof e.listenerCount == "function" ? e.listenerCount(t) : Dr.call(e, t);
189
- };
190
- G.prototype.listenerCount = Dr;
191
- function Dr(e) {
192
- var t = this._events;
193
- if (t !== void 0) {
194
- var r = t[e];
195
- if (typeof r == "function")
196
- return 1;
197
- if (r !== void 0)
198
- return r.length;
199
- }
200
- return 0;
201
- }
202
- G.prototype.eventNames = function() {
203
- return this._eventsCount > 0 ? De(this._events) : [];
204
- };
205
- function Br(e, t) {
206
- for (var r = new Array(t), o = 0; o < t; ++o)
207
- r[o] = e[o];
208
- return r;
209
- }
210
- function _n(e, t) {
211
- for (; t + 1 < e.length; t++)
212
- e[t] = e[t + 1];
213
- e.pop();
214
- }
215
- function Sn(e) {
216
- for (var t = new Array(e.length), r = 0; r < t.length; ++r)
217
- t[r] = e[r].listener || e[r];
218
- return t;
219
- }
220
- function En(e, t) {
221
- return new Promise(function(r, o) {
222
- function a(c) {
223
- e.removeListener(t, d), o(c);
224
- }
225
- function d() {
226
- typeof e.removeListener == "function" && e.removeListener("error", a), r([].slice.call(arguments));
227
- }
228
- Cr(e, t, d, { once: !0 }), t !== "error" && An(e, a, { once: !0 });
229
- });
230
- }
231
- function An(e, t, r) {
232
- typeof e.on == "function" && Cr(e, "error", t, r);
233
- }
234
- function Cr(e, t, r, o) {
235
- if (typeof e.on == "function")
236
- o.once ? e.once(t, r) : e.on(t, r);
237
- else if (typeof e.addEventListener == "function")
238
- e.addEventListener(t, function a(d) {
239
- o.once && e.removeEventListener(t, a), r(d);
240
- });
241
- else
242
- throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
243
- }
244
- var Fr = It.exports, $r = Fr.EventEmitter;
245
- const Ve = /* @__PURE__ */ vn(bn);
246
- var Dt = {}, Ur = {}, kr = function() {
247
- if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
248
- return !1;
249
- if (typeof Symbol.iterator == "symbol")
250
- return !0;
251
- var t = {}, r = Symbol("test"), o = Object(r);
252
- if (typeof r == "string" || Object.prototype.toString.call(r) !== "[object Symbol]" || Object.prototype.toString.call(o) !== "[object Symbol]")
253
- return !1;
254
- var a = 42;
255
- t[r] = a;
256
- for (var d in t)
257
- return !1;
258
- if (typeof Object.keys == "function" && Object.keys(t).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(t).length !== 0)
259
- return !1;
260
- var c = Object.getOwnPropertySymbols(t);
261
- if (c.length !== 1 || c[0] !== r || !Object.prototype.propertyIsEnumerable.call(t, r))
262
- return !1;
263
- if (typeof Object.getOwnPropertyDescriptor == "function") {
264
- var m = (
265
- /** @type {PropertyDescriptor} */
266
- Object.getOwnPropertyDescriptor(t, r)
267
- );
268
- if (m.value !== a || m.enumerable !== !0)
269
- return !1;
270
- }
271
- return !0;
272
- }, Rn = kr, ze = function() {
273
- return Rn() && !!Symbol.toStringTag;
274
- }, Wr = Object, On = Error, Pn = EvalError, Tn = RangeError, jn = ReferenceError, xr = SyntaxError, Oe = TypeError, Mn = URIError, Ln = Math.abs, Nn = Math.floor, In = Math.max, Dn = Math.min, Bn = Math.pow, Cn = Math.round, Fn = Number.isNaN || function(t) {
275
- return t !== t;
276
- }, $n = Fn, Un = function(t) {
277
- return $n(t) || t === 0 ? t : t < 0 ? -1 : 1;
278
- }, kn = Object.getOwnPropertyDescriptor, Be = kn;
279
- if (Be)
280
- try {
281
- Be([], "length");
282
- } catch {
283
- Be = null;
284
- }
285
- var _e = Be, Ce = Object.defineProperty || !1;
286
- if (Ce)
287
- try {
288
- Ce({}, "a", { value: 1 });
289
- } catch {
290
- Ce = !1;
291
- }
292
- var Ke = Ce, tt, Ht;
293
- function Wn() {
294
- if (Ht) return tt;
295
- Ht = 1;
296
- var e = typeof Symbol < "u" && Symbol, t = kr;
297
- return tt = function() {
298
- return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : t();
299
- }, tt;
300
- }
301
- var qr = typeof Reflect < "u" && Reflect.getPrototypeOf || null, xn = Wr, Gr = xn.getPrototypeOf || null, rt, Vt;
302
- function qn() {
303
- if (Vt) return rt;
304
- Vt = 1;
305
- var e = "Function.prototype.bind called on incompatible ", t = Object.prototype.toString, r = Math.max, o = "[object Function]", a = function(y, E) {
306
- for (var L = [], N = 0; N < y.length; N += 1)
307
- L[N] = y[N];
308
- for (var D = 0; D < E.length; D += 1)
309
- L[D + y.length] = E[D];
310
- return L;
311
- }, d = function(y, E) {
312
- for (var L = [], N = E, D = 0; N < y.length; N += 1, D += 1)
313
- L[D] = y[N];
314
- return L;
315
- }, c = function(m, y) {
316
- for (var E = "", L = 0; L < m.length; L += 1)
317
- E += m[L], L + 1 < m.length && (E += y);
318
- return E;
319
- };
320
- return rt = function(y) {
321
- var E = this;
322
- if (typeof E != "function" || t.apply(E) !== o)
323
- throw new TypeError(e + E);
324
- for (var L = d(arguments, 1), N, D = function() {
325
- if (this instanceof N) {
326
- var u = E.apply(
327
- this,
328
- a(L, arguments)
329
- );
330
- return Object(u) === u ? u : this;
331
- }
332
- return E.apply(
333
- y,
334
- a(L, arguments)
335
- );
336
- }, x = r(0, E.length - L.length), P = [], M = 0; M < x; M++)
337
- P[M] = "$" + M;
338
- if (N = Function("binder", "return function (" + c(P, ",") + "){ return binder.apply(this,arguments); }")(D), E.prototype) {
339
- var R = function() {
340
- };
341
- R.prototype = E.prototype, N.prototype = new R(), R.prototype = null;
342
- }
343
- return N;
344
- }, rt;
345
- }
346
- var nt, zt;
347
- function Pe() {
348
- if (zt) return nt;
349
- zt = 1;
350
- var e = qn();
351
- return nt = Function.prototype.bind || e, nt;
352
- }
353
- var it, Kt;
354
- function Bt() {
355
- return Kt || (Kt = 1, it = Function.prototype.call), it;
356
- }
357
- var ot, Jt;
358
- function Ct() {
359
- return Jt || (Jt = 1, ot = Function.prototype.apply), ot;
360
- }
361
- var Gn = typeof Reflect < "u" && Reflect && Reflect.apply, Hn = Pe(), Vn = Ct(), zn = Bt(), Kn = Gn, Hr = Kn || Hn.call(zn, Vn), Jn = Pe(), Yn = Oe, Zn = Bt(), Xn = Hr, Ft = function(t) {
362
- if (t.length < 1 || typeof t[0] != "function")
363
- throw new Yn("a function is required");
364
- return Xn(Jn, Zn, t);
365
- }, Qn = Ft, Yt = _e, Vr;
366
- try {
367
- Vr = /** @type {{ __proto__?: typeof Array.prototype }} */
368
- [].__proto__ === Array.prototype;
369
- } catch (e) {
370
- if (!e || typeof e != "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS")
371
- throw e;
372
- }
373
- var at = !!Vr && Yt && Yt(
374
- Object.prototype,
375
- /** @type {keyof typeof Object.prototype} */
376
- "__proto__"
377
- ), zr = Object, Zt = zr.getPrototypeOf, ei = at && typeof at.get == "function" ? Qn([at.get]) : typeof Zt == "function" ? (
378
- /** @type {import('./get')} */
379
- function(t) {
380
- return Zt(t == null ? t : zr(t));
381
- }
382
- ) : !1, Xt = qr, Qt = Gr, er = ei, $t = Xt ? function(t) {
383
- return Xt(t);
384
- } : Qt ? function(t) {
385
- if (!t || typeof t != "object" && typeof t != "function")
386
- throw new TypeError("getProto: not an object");
387
- return Qt(t);
388
- } : er ? function(t) {
389
- return er(t);
390
- } : null, ft, tr;
391
- function Kr() {
392
- if (tr) return ft;
393
- tr = 1;
394
- var e = Function.prototype.call, t = Object.prototype.hasOwnProperty, r = Pe();
395
- return ft = r.call(e, t), ft;
396
- }
397
- var k, ti = Wr, ri = On, ni = Pn, ii = Tn, oi = jn, we = xr, be = Oe, ai = Mn, fi = Ln, ui = Nn, li = In, si = Dn, ci = Bn, di = Cn, pi = Un, Jr = Function, ut = function(e) {
398
- try {
399
- return Jr('"use strict"; return (' + e + ").constructor;")();
400
- } catch {
401
- }
402
- }, Ee = _e, yi = Ke, lt = function() {
403
- throw new be();
404
- }, hi = Ee ? function() {
405
- try {
406
- return arguments.callee, lt;
407
- } catch {
408
- try {
409
- return Ee(arguments, "callee").get;
410
- } catch {
411
- return lt;
412
- }
413
- }
414
- }() : lt, pe = Wn()(), V = $t, gi = Gr, vi = qr, Yr = Ct(), Te = Bt(), he = {}, bi = typeof Uint8Array > "u" || !V ? k : V(Uint8Array), le = {
415
- __proto__: null,
416
- "%AggregateError%": typeof AggregateError > "u" ? k : AggregateError,
417
- "%Array%": Array,
418
- "%ArrayBuffer%": typeof ArrayBuffer > "u" ? k : ArrayBuffer,
419
- "%ArrayIteratorPrototype%": pe && V ? V([][Symbol.iterator]()) : k,
420
- "%AsyncFromSyncIteratorPrototype%": k,
421
- "%AsyncFunction%": he,
422
- "%AsyncGenerator%": he,
423
- "%AsyncGeneratorFunction%": he,
424
- "%AsyncIteratorPrototype%": he,
425
- "%Atomics%": typeof Atomics > "u" ? k : Atomics,
426
- "%BigInt%": typeof BigInt > "u" ? k : BigInt,
427
- "%BigInt64Array%": typeof BigInt64Array > "u" ? k : BigInt64Array,
428
- "%BigUint64Array%": typeof BigUint64Array > "u" ? k : BigUint64Array,
429
- "%Boolean%": Boolean,
430
- "%DataView%": typeof DataView > "u" ? k : DataView,
431
- "%Date%": Date,
432
- "%decodeURI%": decodeURI,
433
- "%decodeURIComponent%": decodeURIComponent,
434
- "%encodeURI%": encodeURI,
435
- "%encodeURIComponent%": encodeURIComponent,
436
- "%Error%": ri,
437
- "%eval%": eval,
438
- // eslint-disable-line no-eval
439
- "%EvalError%": ni,
440
- "%Float16Array%": typeof Float16Array > "u" ? k : Float16Array,
441
- "%Float32Array%": typeof Float32Array > "u" ? k : Float32Array,
442
- "%Float64Array%": typeof Float64Array > "u" ? k : Float64Array,
443
- "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? k : FinalizationRegistry,
444
- "%Function%": Jr,
445
- "%GeneratorFunction%": he,
446
- "%Int8Array%": typeof Int8Array > "u" ? k : Int8Array,
447
- "%Int16Array%": typeof Int16Array > "u" ? k : Int16Array,
448
- "%Int32Array%": typeof Int32Array > "u" ? k : Int32Array,
449
- "%isFinite%": isFinite,
450
- "%isNaN%": isNaN,
451
- "%IteratorPrototype%": pe && V ? V(V([][Symbol.iterator]())) : k,
452
- "%JSON%": typeof JSON == "object" ? JSON : k,
453
- "%Map%": typeof Map > "u" ? k : Map,
454
- "%MapIteratorPrototype%": typeof Map > "u" || !pe || !V ? k : V((/* @__PURE__ */ new Map())[Symbol.iterator]()),
455
- "%Math%": Math,
456
- "%Number%": Number,
457
- "%Object%": ti,
458
- "%Object.getOwnPropertyDescriptor%": Ee,
459
- "%parseFloat%": parseFloat,
460
- "%parseInt%": parseInt,
461
- "%Promise%": typeof Promise > "u" ? k : Promise,
462
- "%Proxy%": typeof Proxy > "u" ? k : Proxy,
463
- "%RangeError%": ii,
464
- "%ReferenceError%": oi,
465
- "%Reflect%": typeof Reflect > "u" ? k : Reflect,
466
- "%RegExp%": RegExp,
467
- "%Set%": typeof Set > "u" ? k : Set,
468
- "%SetIteratorPrototype%": typeof Set > "u" || !pe || !V ? k : V((/* @__PURE__ */ new Set())[Symbol.iterator]()),
469
- "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? k : SharedArrayBuffer,
470
- "%String%": String,
471
- "%StringIteratorPrototype%": pe && V ? V(""[Symbol.iterator]()) : k,
472
- "%Symbol%": pe ? Symbol : k,
473
- "%SyntaxError%": we,
474
- "%ThrowTypeError%": hi,
475
- "%TypedArray%": bi,
476
- "%TypeError%": be,
477
- "%Uint8Array%": typeof Uint8Array > "u" ? k : Uint8Array,
478
- "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? k : Uint8ClampedArray,
479
- "%Uint16Array%": typeof Uint16Array > "u" ? k : Uint16Array,
480
- "%Uint32Array%": typeof Uint32Array > "u" ? k : Uint32Array,
481
- "%URIError%": ai,
482
- "%WeakMap%": typeof WeakMap > "u" ? k : WeakMap,
483
- "%WeakRef%": typeof WeakRef > "u" ? k : WeakRef,
484
- "%WeakSet%": typeof WeakSet > "u" ? k : WeakSet,
485
- "%Function.prototype.call%": Te,
486
- "%Function.prototype.apply%": Yr,
487
- "%Object.defineProperty%": yi,
488
- "%Object.getPrototypeOf%": gi,
489
- "%Math.abs%": fi,
490
- "%Math.floor%": ui,
491
- "%Math.max%": li,
492
- "%Math.min%": si,
493
- "%Math.pow%": ci,
494
- "%Math.round%": di,
495
- "%Math.sign%": pi,
496
- "%Reflect.getPrototypeOf%": vi
497
- };
498
- if (V)
499
- try {
500
- null.error;
501
- } catch (e) {
502
- var wi = V(V(e));
503
- le["%Error.prototype%"] = wi;
504
- }
505
- var mi = function e(t) {
506
- var r;
507
- if (t === "%AsyncFunction%")
508
- r = ut("async function () {}");
509
- else if (t === "%GeneratorFunction%")
510
- r = ut("function* () {}");
511
- else if (t === "%AsyncGeneratorFunction%")
512
- r = ut("async function* () {}");
513
- else if (t === "%AsyncGenerator%") {
514
- var o = e("%AsyncGeneratorFunction%");
515
- o && (r = o.prototype);
516
- } else if (t === "%AsyncIteratorPrototype%") {
517
- var a = e("%AsyncGenerator%");
518
- a && V && (r = V(a.prototype));
519
- }
520
- return le[t] = r, r;
521
- }, rr = {
522
- __proto__: null,
523
- "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
524
- "%ArrayPrototype%": ["Array", "prototype"],
525
- "%ArrayProto_entries%": ["Array", "prototype", "entries"],
526
- "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
527
- "%ArrayProto_keys%": ["Array", "prototype", "keys"],
528
- "%ArrayProto_values%": ["Array", "prototype", "values"],
529
- "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
530
- "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
531
- "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
532
- "%BooleanPrototype%": ["Boolean", "prototype"],
533
- "%DataViewPrototype%": ["DataView", "prototype"],
534
- "%DatePrototype%": ["Date", "prototype"],
535
- "%ErrorPrototype%": ["Error", "prototype"],
536
- "%EvalErrorPrototype%": ["EvalError", "prototype"],
537
- "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
538
- "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
539
- "%FunctionPrototype%": ["Function", "prototype"],
540
- "%Generator%": ["GeneratorFunction", "prototype"],
541
- "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
542
- "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
543
- "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
544
- "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
545
- "%JSONParse%": ["JSON", "parse"],
546
- "%JSONStringify%": ["JSON", "stringify"],
547
- "%MapPrototype%": ["Map", "prototype"],
548
- "%NumberPrototype%": ["Number", "prototype"],
549
- "%ObjectPrototype%": ["Object", "prototype"],
550
- "%ObjProto_toString%": ["Object", "prototype", "toString"],
551
- "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
552
- "%PromisePrototype%": ["Promise", "prototype"],
553
- "%PromiseProto_then%": ["Promise", "prototype", "then"],
554
- "%Promise_all%": ["Promise", "all"],
555
- "%Promise_reject%": ["Promise", "reject"],
556
- "%Promise_resolve%": ["Promise", "resolve"],
557
- "%RangeErrorPrototype%": ["RangeError", "prototype"],
558
- "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
559
- "%RegExpPrototype%": ["RegExp", "prototype"],
560
- "%SetPrototype%": ["Set", "prototype"],
561
- "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
562
- "%StringPrototype%": ["String", "prototype"],
563
- "%SymbolPrototype%": ["Symbol", "prototype"],
564
- "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
565
- "%TypedArrayPrototype%": ["TypedArray", "prototype"],
566
- "%TypeErrorPrototype%": ["TypeError", "prototype"],
567
- "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
568
- "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
569
- "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
570
- "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
571
- "%URIErrorPrototype%": ["URIError", "prototype"],
572
- "%WeakMapPrototype%": ["WeakMap", "prototype"],
573
- "%WeakSetPrototype%": ["WeakSet", "prototype"]
574
- }, je = Pe(), We = Kr(), _i = je.call(Te, Array.prototype.concat), Si = je.call(Yr, Array.prototype.splice), nr = je.call(Te, String.prototype.replace), xe = je.call(Te, String.prototype.slice), Ei = je.call(Te, RegExp.prototype.exec), Ai = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Ri = /\\(\\)?/g, Oi = function(t) {
575
- var r = xe(t, 0, 1), o = xe(t, -1);
576
- if (r === "%" && o !== "%")
577
- throw new we("invalid intrinsic syntax, expected closing `%`");
578
- if (o === "%" && r !== "%")
579
- throw new we("invalid intrinsic syntax, expected opening `%`");
580
- var a = [];
581
- return nr(t, Ai, function(d, c, m, y) {
582
- a[a.length] = m ? nr(y, Ri, "$1") : c || d;
583
- }), a;
584
- }, Pi = function(t, r) {
585
- var o = t, a;
586
- if (We(rr, o) && (a = rr[o], o = "%" + a[0] + "%"), We(le, o)) {
587
- var d = le[o];
588
- if (d === he && (d = mi(o)), typeof d > "u" && !r)
589
- throw new be("intrinsic " + t + " exists, but is not available. Please file an issue!");
590
- return {
591
- alias: a,
592
- name: o,
593
- value: d
594
- };
595
- }
596
- throw new we("intrinsic " + t + " does not exist!");
597
- }, Zr = function(t, r) {
598
- if (typeof t != "string" || t.length === 0)
599
- throw new be("intrinsic name must be a non-empty string");
600
- if (arguments.length > 1 && typeof r != "boolean")
601
- throw new be('"allowMissing" argument must be a boolean');
602
- if (Ei(/^%?[^%]*%?$/, t) === null)
603
- throw new we("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
604
- var o = Oi(t), a = o.length > 0 ? o[0] : "", d = Pi("%" + a + "%", r), c = d.name, m = d.value, y = !1, E = d.alias;
605
- E && (a = E[0], Si(o, _i([0, 1], E)));
606
- for (var L = 1, N = !0; L < o.length; L += 1) {
607
- var D = o[L], x = xe(D, 0, 1), P = xe(D, -1);
608
- if ((x === '"' || x === "'" || x === "`" || P === '"' || P === "'" || P === "`") && x !== P)
609
- throw new we("property names with quotes must have matching quotes");
610
- if ((D === "constructor" || !N) && (y = !0), a += "." + D, c = "%" + a + "%", We(le, c))
611
- m = le[c];
612
- else if (m != null) {
613
- if (!(D in m)) {
614
- if (!r)
615
- throw new be("base intrinsic for " + t + " exists, but the property is not available.");
616
- return;
617
- }
618
- if (Ee && L + 1 >= o.length) {
619
- var M = Ee(m, D);
620
- N = !!M, N && "get" in M && !("originalValue" in M.get) ? m = M.get : m = m[D];
621
- } else
622
- N = We(m, D), m = m[D];
623
- N && !y && (le[c] = m);
624
- }
625
- }
626
- return m;
627
- }, Xr = Zr, Qr = Ft, Ti = Qr([Xr("%String.prototype.indexOf%")]), Me = function(t, r) {
628
- var o = (
629
- /** @type {(this: unknown, ...args: unknown[]) => unknown} */
630
- Xr(t, !!r)
631
- );
632
- return typeof o == "function" && Ti(t, ".prototype.") > -1 ? Qr(
633
- /** @type {const} */
634
- [o]
635
- ) : o;
636
- }, ji = ze(), Mi = Me, Rt = Mi("Object.prototype.toString"), Je = function(t) {
637
- return ji && t && typeof t == "object" && Symbol.toStringTag in t ? !1 : Rt(t) === "[object Arguments]";
638
- }, en = function(t) {
639
- return Je(t) ? !0 : t !== null && typeof t == "object" && "length" in t && typeof t.length == "number" && t.length >= 0 && Rt(t) !== "[object Array]" && "callee" in t && Rt(t.callee) === "[object Function]";
640
- }, Li = function() {
641
- return Je(arguments);
642
- }();
643
- Je.isLegacyArguments = en;
644
- var Ni = Li ? Je : en, ir = Me, Ii = ze(), Di = Kr(), Bi = _e, Ot;
645
- if (Ii) {
646
- var Ci = ir("RegExp.prototype.exec"), or = {}, st = function() {
647
- throw or;
648
- }, ar = {
649
- toString: st,
650
- valueOf: st
651
- };
652
- typeof Symbol.toPrimitive == "symbol" && (ar[Symbol.toPrimitive] = st), Ot = function(t) {
653
- if (!t || typeof t != "object")
654
- return !1;
655
- var r = (
656
- /** @type {NonNullable<typeof gOPD>} */
657
- Bi(
658
- /** @type {{ lastIndex?: unknown }} */
659
- t,
660
- "lastIndex"
661
- )
662
- ), o = r && Di(r, "value");
663
- if (!o)
664
- return !1;
665
- try {
666
- Ci(
667
- t,
668
- /** @type {string} */
669
- /** @type {unknown} */
670
- ar
671
- );
672
- } catch (a) {
673
- return a === or;
674
- }
675
- };
676
- } else {
677
- var Fi = ir("Object.prototype.toString"), $i = "[object RegExp]";
678
- Ot = function(t) {
679
- return !t || typeof t != "object" && typeof t != "function" ? !1 : Fi(t) === $i;
680
- };
681
- }
682
- var Ui = Ot, ki = Me, Wi = Ui, xi = ki("RegExp.prototype.exec"), qi = Oe, Gi = function(t) {
683
- if (!Wi(t))
684
- throw new qi("`regex` must be a RegExp");
685
- return function(o) {
686
- return xi(t, o) !== null;
687
- };
688
- }, tn = Me, Hi = Gi, Vi = Hi(/^\s*(?:function)?\*/), rn = ze(), ct = $t, zi = tn("Object.prototype.toString"), Ki = tn("Function.prototype.toString"), Ji = function() {
689
- if (!rn)
690
- return !1;
691
- try {
692
- return Function("return function*() {}")();
693
- } catch {
694
- }
695
- }, dt, Yi = function(t) {
696
- if (typeof t != "function")
697
- return !1;
698
- if (Vi(Ki(t)))
699
- return !0;
700
- if (!rn) {
701
- var r = zi(t);
702
- return r === "[object GeneratorFunction]";
703
- }
704
- if (!ct)
705
- return !1;
706
- if (typeof dt > "u") {
707
- var o = Ji();
708
- dt = o ? (
709
- /** @type {GeneratorFunctionConstructor} */
710
- ct(o)
711
- ) : !1;
712
- }
713
- return ct(t) === dt;
714
- }, nn = Function.prototype.toString, ge = typeof Reflect == "object" && Reflect !== null && Reflect.apply, Pt, Fe;
715
- if (typeof ge == "function" && typeof Object.defineProperty == "function")
716
- try {
717
- Pt = Object.defineProperty({}, "length", {
718
- get: function() {
719
- throw Fe;
720
- }
721
- }), Fe = {}, ge(function() {
722
- throw 42;
723
- }, null, Pt);
724
- } catch (e) {
725
- e !== Fe && (ge = null);
726
- }
727
- else
728
- ge = null;
729
- var Zi = /^\s*class\b/, Tt = function(t) {
730
- try {
731
- var r = nn.call(t);
732
- return Zi.test(r);
733
- } catch {
734
- return !1;
735
- }
736
- }, pt = function(t) {
737
- try {
738
- return Tt(t) ? !1 : (nn.call(t), !0);
739
- } catch {
740
- return !1;
741
- }
742
- }, $e = Object.prototype.toString, Xi = "[object Object]", Qi = "[object Function]", eo = "[object GeneratorFunction]", to = "[object HTMLAllCollection]", ro = "[object HTML document.all class]", no = "[object HTMLCollection]", io = typeof Symbol == "function" && !!Symbol.toStringTag, oo = !(0 in [,]), jt = function() {
743
- return !1;
744
- };
745
- if (typeof document == "object") {
746
- var ao = document.all;
747
- $e.call(ao) === $e.call(document.all) && (jt = function(t) {
748
- if ((oo || !t) && (typeof t > "u" || typeof t == "object"))
749
- try {
750
- var r = $e.call(t);
751
- return (r === to || r === ro || r === no || r === Xi) && t("") == null;
752
- } catch {
753
- }
754
- return !1;
755
- });
756
- }
757
- var fo = ge ? function(t) {
758
- if (jt(t))
759
- return !0;
760
- if (!t || typeof t != "function" && typeof t != "object")
761
- return !1;
762
- try {
763
- ge(t, null, Pt);
764
- } catch (r) {
765
- if (r !== Fe)
766
- return !1;
767
- }
768
- return !Tt(t) && pt(t);
769
- } : function(t) {
770
- if (jt(t))
771
- return !0;
772
- if (!t || typeof t != "function" && typeof t != "object")
773
- return !1;
774
- if (io)
775
- return pt(t);
776
- if (Tt(t))
777
- return !1;
778
- var r = $e.call(t);
779
- return r !== Qi && r !== eo && !/^\[object HTML/.test(r) ? !1 : pt(t);
780
- }, uo = fo, lo = Object.prototype.toString, on = Object.prototype.hasOwnProperty, so = function(t, r, o) {
781
- for (var a = 0, d = t.length; a < d; a++)
782
- on.call(t, a) && (o == null ? r(t[a], a, t) : r.call(o, t[a], a, t));
783
- }, co = function(t, r, o) {
784
- for (var a = 0, d = t.length; a < d; a++)
785
- o == null ? r(t.charAt(a), a, t) : r.call(o, t.charAt(a), a, t);
786
- }, po = function(t, r, o) {
787
- for (var a in t)
788
- on.call(t, a) && (o == null ? r(t[a], a, t) : r.call(o, t[a], a, t));
789
- };
790
- function yo(e) {
791
- return lo.call(e) === "[object Array]";
792
- }
793
- var ho = function(t, r, o) {
794
- if (!uo(r))
795
- throw new TypeError("iterator must be a function");
796
- var a;
797
- arguments.length >= 3 && (a = o), yo(t) ? so(t, r, a) : typeof t == "string" ? co(t, r, a) : po(t, r, a);
798
- }, go = [
799
- "Float16Array",
800
- "Float32Array",
801
- "Float64Array",
802
- "Int8Array",
803
- "Int16Array",
804
- "Int32Array",
805
- "Uint8Array",
806
- "Uint8ClampedArray",
807
- "Uint16Array",
808
- "Uint32Array",
809
- "BigInt64Array",
810
- "BigUint64Array"
811
- ], yt = go, vo = typeof globalThis > "u" ? ue : globalThis, bo = function() {
812
- for (var t = [], r = 0; r < yt.length; r++)
813
- typeof vo[yt[r]] == "function" && (t[t.length] = yt[r]);
814
- return t;
815
- }, an = { exports: {} }, fr = Ke, wo = xr, ye = Oe, ur = _e, mo = function(t, r, o) {
816
- if (!t || typeof t != "object" && typeof t != "function")
817
- throw new ye("`obj` must be an object or a function`");
818
- if (typeof r != "string" && typeof r != "symbol")
819
- throw new ye("`property` must be a string or a symbol`");
820
- if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
821
- throw new ye("`nonEnumerable`, if provided, must be a boolean or null");
822
- if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
823
- throw new ye("`nonWritable`, if provided, must be a boolean or null");
824
- if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
825
- throw new ye("`nonConfigurable`, if provided, must be a boolean or null");
826
- if (arguments.length > 6 && typeof arguments[6] != "boolean")
827
- throw new ye("`loose`, if provided, must be a boolean");
828
- var a = arguments.length > 3 ? arguments[3] : null, d = arguments.length > 4 ? arguments[4] : null, c = arguments.length > 5 ? arguments[5] : null, m = arguments.length > 6 ? arguments[6] : !1, y = !!ur && ur(t, r);
829
- if (fr)
830
- fr(t, r, {
831
- configurable: c === null && y ? y.configurable : !c,
832
- enumerable: a === null && y ? y.enumerable : !a,
833
- value: o,
834
- writable: d === null && y ? y.writable : !d
835
- });
836
- else if (m || !a && !d && !c)
837
- t[r] = o;
838
- else
839
- throw new wo("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
840
- }, Mt = Ke, fn = function() {
841
- return !!Mt;
842
- };
843
- fn.hasArrayLengthDefineBug = function() {
844
- if (!Mt)
845
- return null;
846
- try {
847
- return Mt([], "length", { value: 1 }).length !== 1;
848
- } catch {
849
- return !0;
850
- }
851
- };
852
- var _o = fn, So = Zr, lr = mo, Eo = _o(), sr = _e, cr = Oe, Ao = So("%Math.floor%"), Ro = function(t, r) {
853
- if (typeof t != "function")
854
- throw new cr("`fn` is not a function");
855
- if (typeof r != "number" || r < 0 || r > 4294967295 || Ao(r) !== r)
856
- throw new cr("`length` must be a positive 32-bit integer");
857
- var o = arguments.length > 2 && !!arguments[2], a = !0, d = !0;
858
- if ("length" in t && sr) {
859
- var c = sr(t, "length");
860
- c && !c.configurable && (a = !1), c && !c.writable && (d = !1);
861
- }
862
- return (a || d || !o) && (Eo ? lr(
863
- /** @type {Parameters<define>[0]} */
864
- t,
865
- "length",
866
- r,
867
- !0,
868
- !0
869
- ) : lr(
870
- /** @type {Parameters<define>[0]} */
871
- t,
872
- "length",
873
- r
874
- )), t;
875
- }, Oo = Pe(), Po = Ct(), To = Hr, jo = function() {
876
- return To(Oo, Po, arguments);
877
- };
878
- (function(e) {
879
- var t = Ro, r = Ke, o = Ft, a = jo;
880
- e.exports = function(c) {
881
- var m = o(arguments), y = c.length - (arguments.length - 1);
882
- return t(
883
- m,
884
- 1 + (y > 0 ? y : 0),
885
- !0
886
- );
887
- }, r ? r(e.exports, "apply", { value: a }) : e.exports.apply = a;
888
- })(an);
889
- var Mo = an.exports, qe = ho, Lo = bo, dr = Mo, Ut = Me, Ue = _e, Ne = $t, No = Ut("Object.prototype.toString"), un = ze(), pr = typeof globalThis > "u" ? ue : globalThis, Lt = Lo(), kt = Ut("String.prototype.slice"), Io = Ut("Array.prototype.indexOf", !0) || function(t, r) {
890
- for (var o = 0; o < t.length; o += 1)
891
- if (t[o] === r)
892
- return o;
893
- return -1;
894
- }, Ge = { __proto__: null };
895
- un && Ue && Ne ? qe(Lt, function(e) {
896
- var t = new pr[e]();
897
- if (Symbol.toStringTag in t && Ne) {
898
- var r = Ne(t), o = Ue(r, Symbol.toStringTag);
899
- if (!o && r) {
900
- var a = Ne(r);
901
- o = Ue(a, Symbol.toStringTag);
902
- }
903
- Ge["$" + e] = dr(o.get);
904
- }
905
- }) : qe(Lt, function(e) {
906
- var t = new pr[e](), r = t.slice || t.set;
907
- r && (Ge[
908
- /** @type {`$${import('.').TypedArrayName}`} */
909
- "$" + e
910
- ] = /** @type {import('./types').BoundSlice | import('./types').BoundSet} */
911
- // @ts-expect-error TODO FIXME
912
- dr(r));
913
- });
914
- var Do = function(t) {
915
- var r = !1;
916
- return qe(
917
- /** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */
918
- Ge,
919
- /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
920
- function(o, a) {
921
- if (!r)
922
- try {
923
- "$" + o(t) === a && (r = /** @type {import('.').TypedArrayName} */
924
- kt(a, 1));
925
- } catch {
926
- }
927
- }
928
- ), r;
929
- }, Bo = function(t) {
930
- var r = !1;
931
- return qe(
932
- /** @type {Record<`\$${import('.').TypedArrayName}`, Getter>} */
933
- Ge,
934
- /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
935
- function(o, a) {
936
- if (!r)
937
- try {
938
- o(t), r = /** @type {import('.').TypedArrayName} */
939
- kt(a, 1);
940
- } catch {
941
- }
942
- }
943
- ), r;
944
- }, ln = function(t) {
945
- if (!t || typeof t != "object")
946
- return !1;
947
- if (!un) {
948
- var r = kt(No(t), 8, -1);
949
- return Io(Lt, r) > -1 ? r : r !== "Object" ? !1 : Bo(t);
950
- }
951
- return Ue ? Do(t) : null;
952
- }, Co = ln, Fo = function(t) {
953
- return !!Co(t);
954
- };
955
- (function(e) {
956
- var t = Ni, r = Yi, o = ln, a = Fo;
957
- function d(g) {
958
- return g.call.bind(g);
959
- }
960
- var c = typeof BigInt < "u", m = typeof Symbol < "u", y = d(Object.prototype.toString), E = d(Number.prototype.valueOf), L = d(String.prototype.valueOf), N = d(Boolean.prototype.valueOf);
961
- if (c)
962
- var D = d(BigInt.prototype.valueOf);
963
- if (m)
964
- var x = d(Symbol.prototype.valueOf);
965
- function P(g, Le) {
966
- if (typeof g != "object")
967
- return !1;
968
- try {
969
- return Le(g), !0;
970
- } catch {
971
- return !1;
972
- }
973
- }
974
- e.isArgumentsObject = t, e.isGeneratorFunction = r, e.isTypedArray = a;
975
- function M(g) {
976
- return typeof Promise < "u" && g instanceof Promise || g !== null && typeof g == "object" && typeof g.then == "function" && typeof g.catch == "function";
977
- }
978
- e.isPromise = M;
979
- function R(g) {
980
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(g) : a(g) || h(g);
981
- }
982
- e.isArrayBufferView = R;
983
- function u(g) {
984
- return o(g) === "Uint8Array";
985
- }
986
- e.isUint8Array = u;
987
- function b(g) {
988
- return o(g) === "Uint8ClampedArray";
989
- }
990
- e.isUint8ClampedArray = b;
991
- function S(g) {
992
- return o(g) === "Uint16Array";
993
- }
994
- e.isUint16Array = S;
995
- function A(g) {
996
- return o(g) === "Uint32Array";
997
- }
998
- e.isUint32Array = A;
999
- function T(g) {
1000
- return o(g) === "Int8Array";
1001
- }
1002
- e.isInt8Array = T;
1003
- function C(g) {
1004
- return o(g) === "Int16Array";
1005
- }
1006
- e.isInt16Array = C;
1007
- function W(g) {
1008
- return o(g) === "Int32Array";
1009
- }
1010
- e.isInt32Array = W;
1011
- function F(g) {
1012
- return o(g) === "Float32Array";
1013
- }
1014
- e.isFloat32Array = F;
1015
- function I(g) {
1016
- return o(g) === "Float64Array";
1017
- }
1018
- e.isFloat64Array = I;
1019
- function z(g) {
1020
- return o(g) === "BigInt64Array";
1021
- }
1022
- e.isBigInt64Array = z;
1023
- function J(g) {
1024
- return o(g) === "BigUint64Array";
1025
- }
1026
- e.isBigUint64Array = J;
1027
- function Y(g) {
1028
- return y(g) === "[object Map]";
1029
- }
1030
- Y.working = typeof Map < "u" && Y(/* @__PURE__ */ new Map());
1031
- function re(g) {
1032
- return typeof Map > "u" ? !1 : Y.working ? Y(g) : g instanceof Map;
1033
- }
1034
- e.isMap = re;
1035
- function Z(g) {
1036
- return y(g) === "[object Set]";
1037
- }
1038
- Z.working = typeof Set < "u" && Z(/* @__PURE__ */ new Set());
1039
- function ne(g) {
1040
- return typeof Set > "u" ? !1 : Z.working ? Z(g) : g instanceof Set;
1041
- }
1042
- e.isSet = ne;
1043
- function ie(g) {
1044
- return y(g) === "[object WeakMap]";
1045
- }
1046
- ie.working = typeof WeakMap < "u" && ie(/* @__PURE__ */ new WeakMap());
1047
- function Q(g) {
1048
- return typeof WeakMap > "u" ? !1 : ie.working ? ie(g) : g instanceof WeakMap;
1049
- }
1050
- e.isWeakMap = Q;
1051
- function ee(g) {
1052
- return y(g) === "[object WeakSet]";
1053
- }
1054
- ee.working = typeof WeakSet < "u" && ee(/* @__PURE__ */ new WeakSet());
1055
- function K(g) {
1056
- return ee(g);
1057
- }
1058
- e.isWeakSet = K;
1059
- function te(g) {
1060
- return y(g) === "[object ArrayBuffer]";
1061
- }
1062
- te.working = typeof ArrayBuffer < "u" && te(new ArrayBuffer());
1063
- function ae(g) {
1064
- return typeof ArrayBuffer > "u" ? !1 : te.working ? te(g) : g instanceof ArrayBuffer;
1065
- }
1066
- e.isArrayBuffer = ae;
1067
- function s(g) {
1068
- return y(g) === "[object DataView]";
1069
- }
1070
- s.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && s(new DataView(new ArrayBuffer(1), 0, 1));
1071
- function h(g) {
1072
- return typeof DataView > "u" ? !1 : s.working ? s(g) : g instanceof DataView;
1073
- }
1074
- e.isDataView = h;
1075
- var w = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
1076
- function B(g) {
1077
- return y(g) === "[object SharedArrayBuffer]";
1078
- }
1079
- function l(g) {
1080
- return typeof w > "u" ? !1 : (typeof B.working > "u" && (B.working = B(new w())), B.working ? B(g) : g instanceof w);
1081
- }
1082
- e.isSharedArrayBuffer = l;
1083
- function f(g) {
1084
- return y(g) === "[object AsyncFunction]";
1085
- }
1086
- e.isAsyncFunction = f;
1087
- function p(g) {
1088
- return y(g) === "[object Map Iterator]";
1089
- }
1090
- e.isMapIterator = p;
1091
- function _(g) {
1092
- return y(g) === "[object Set Iterator]";
1093
- }
1094
- e.isSetIterator = _;
1095
- function j(g) {
1096
- return y(g) === "[object Generator]";
1097
- }
1098
- e.isGeneratorObject = j;
1099
- function n(g) {
1100
- return y(g) === "[object WebAssembly.Module]";
1101
- }
1102
- e.isWebAssemblyCompiledModule = n;
1103
- function i(g) {
1104
- return P(g, E);
1105
- }
1106
- e.isNumberObject = i;
1107
- function v(g) {
1108
- return P(g, L);
1109
- }
1110
- e.isStringObject = v;
1111
- function O(g) {
1112
- return P(g, N);
1113
- }
1114
- e.isBooleanObject = O;
1115
- function H(g) {
1116
- return c && P(g, D);
1117
- }
1118
- e.isBigIntObject = H;
1119
- function $(g) {
1120
- return m && P(g, x);
1121
- }
1122
- e.isSymbolObject = $;
1123
- function q(g) {
1124
- return i(g) || v(g) || O(g) || H(g) || $(g);
1125
- }
1126
- e.isBoxedPrimitive = q;
1127
- function fe(g) {
1128
- return typeof Uint8Array < "u" && (ae(g) || l(g));
1129
- }
1130
- e.isAnyArrayBuffer = fe, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(g) {
1131
- Object.defineProperty(e, g, {
1132
- enumerable: !1,
1133
- value: function() {
1134
- throw new Error(g + " is not supported in userland");
1135
- }
1136
- });
1137
- });
1138
- })(Ur);
1139
- var $o = function(t) {
1140
- return t && typeof t == "object" && typeof t.copy == "function" && typeof t.fill == "function" && typeof t.readUInt8 == "function";
1141
- };
1142
- (function(e) {
1143
- var t = Object.getOwnPropertyDescriptors || function(h) {
1144
- for (var w = Object.keys(h), B = {}, l = 0; l < w.length; l++)
1145
- B[w[l]] = Object.getOwnPropertyDescriptor(h, w[l]);
1146
- return B;
1147
- }, r = /%[sdj%]/g;
1148
- e.format = function(s) {
1149
- if (!T(s)) {
1150
- for (var h = [], w = 0; w < arguments.length; w++)
1151
- h.push(c(arguments[w]));
1152
- return h.join(" ");
1153
- }
1154
- for (var w = 1, B = arguments, l = B.length, f = String(s).replace(r, function(_) {
1155
- if (_ === "%%") return "%";
1156
- if (w >= l) return _;
1157
- switch (_) {
1158
- case "%s":
1159
- return String(B[w++]);
1160
- case "%d":
1161
- return Number(B[w++]);
1162
- case "%j":
1163
- try {
1164
- return JSON.stringify(B[w++]);
1165
- } catch {
1166
- return "[Circular]";
1167
- }
1168
- default:
1169
- return _;
1170
- }
1171
- }), p = B[w]; w < l; p = B[++w])
1172
- b(p) || !I(p) ? f += " " + p : f += " " + c(p);
1173
- return f;
1174
- }, e.deprecate = function(s, h) {
1175
- if (typeof U < "u" && U.noDeprecation === !0)
1176
- return s;
1177
- if (typeof U > "u")
1178
- return function() {
1179
- return e.deprecate(s, h).apply(this, arguments);
1180
- };
1181
- var w = !1;
1182
- function B() {
1183
- if (!w) {
1184
- if (U.throwDeprecation)
1185
- throw new Error(h);
1186
- U.traceDeprecation ? console.trace(h) : console.error(h), w = !0;
1187
- }
1188
- return s.apply(this, arguments);
1189
- }
1190
- return B;
1191
- };
1192
- var o = {}, a = /^$/;
1193
- if (U.env.NODE_DEBUG) {
1194
- var d = U.env.NODE_DEBUG;
1195
- d = d.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), a = new RegExp("^" + d + "$", "i");
1196
- }
1197
- e.debuglog = function(s) {
1198
- if (s = s.toUpperCase(), !o[s])
1199
- if (a.test(s)) {
1200
- var h = U.pid;
1201
- o[s] = function() {
1202
- var w = e.format.apply(e, arguments);
1203
- console.error("%s %d: %s", s, h, w);
1204
- };
1205
- } else
1206
- o[s] = function() {
1207
- };
1208
- return o[s];
1209
- };
1210
- function c(s, h) {
1211
- var w = {
1212
- seen: [],
1213
- stylize: y
1214
- };
1215
- return arguments.length >= 3 && (w.depth = arguments[2]), arguments.length >= 4 && (w.colors = arguments[3]), u(h) ? w.showHidden = h : h && e._extend(w, h), W(w.showHidden) && (w.showHidden = !1), W(w.depth) && (w.depth = 2), W(w.colors) && (w.colors = !1), W(w.customInspect) && (w.customInspect = !0), w.colors && (w.stylize = m), L(w, s, w.depth);
1216
- }
1217
- e.inspect = c, c.colors = {
1218
- bold: [1, 22],
1219
- italic: [3, 23],
1220
- underline: [4, 24],
1221
- inverse: [7, 27],
1222
- white: [37, 39],
1223
- grey: [90, 39],
1224
- black: [30, 39],
1225
- blue: [34, 39],
1226
- cyan: [36, 39],
1227
- green: [32, 39],
1228
- magenta: [35, 39],
1229
- red: [31, 39],
1230
- yellow: [33, 39]
1231
- }, c.styles = {
1232
- special: "cyan",
1233
- number: "yellow",
1234
- boolean: "yellow",
1235
- undefined: "grey",
1236
- null: "bold",
1237
- string: "green",
1238
- date: "magenta",
1239
- // "name": intentionally not styling
1240
- regexp: "red"
1241
- };
1242
- function m(s, h) {
1243
- var w = c.styles[h];
1244
- return w ? "\x1B[" + c.colors[w][0] + "m" + s + "\x1B[" + c.colors[w][1] + "m" : s;
1245
- }
1246
- function y(s, h) {
1247
- return s;
1248
- }
1249
- function E(s) {
1250
- var h = {};
1251
- return s.forEach(function(w, B) {
1252
- h[w] = !0;
1253
- }), h;
1254
- }
1255
- function L(s, h, w) {
1256
- if (s.customInspect && h && Y(h.inspect) && // Filter out the util module, it's inspect function is special
1257
- h.inspect !== e.inspect && // Also filter out any prototype objects using the circular check.
1258
- !(h.constructor && h.constructor.prototype === h)) {
1259
- var B = h.inspect(w, s);
1260
- return T(B) || (B = L(s, B, w)), B;
1261
- }
1262
- var l = N(s, h);
1263
- if (l)
1264
- return l;
1265
- var f = Object.keys(h), p = E(f);
1266
- if (s.showHidden && (f = Object.getOwnPropertyNames(h)), J(h) && (f.indexOf("message") >= 0 || f.indexOf("description") >= 0))
1267
- return D(h);
1268
- if (f.length === 0) {
1269
- if (Y(h)) {
1270
- var _ = h.name ? ": " + h.name : "";
1271
- return s.stylize("[Function" + _ + "]", "special");
1272
- }
1273
- if (F(h))
1274
- return s.stylize(RegExp.prototype.toString.call(h), "regexp");
1275
- if (z(h))
1276
- return s.stylize(Date.prototype.toString.call(h), "date");
1277
- if (J(h))
1278
- return D(h);
1279
- }
1280
- var j = "", n = !1, i = ["{", "}"];
1281
- if (R(h) && (n = !0, i = ["[", "]"]), Y(h)) {
1282
- var v = h.name ? ": " + h.name : "";
1283
- j = " [Function" + v + "]";
1284
- }
1285
- if (F(h) && (j = " " + RegExp.prototype.toString.call(h)), z(h) && (j = " " + Date.prototype.toUTCString.call(h)), J(h) && (j = " " + D(h)), f.length === 0 && (!n || h.length == 0))
1286
- return i[0] + j + i[1];
1287
- if (w < 0)
1288
- return F(h) ? s.stylize(RegExp.prototype.toString.call(h), "regexp") : s.stylize("[Object]", "special");
1289
- s.seen.push(h);
1290
- var O;
1291
- return n ? O = x(s, h, w, p, f) : O = f.map(function(H) {
1292
- return P(s, h, w, p, H, n);
1293
- }), s.seen.pop(), M(O, j, i);
1294
- }
1295
- function N(s, h) {
1296
- if (W(h))
1297
- return s.stylize("undefined", "undefined");
1298
- if (T(h)) {
1299
- var w = "'" + JSON.stringify(h).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
1300
- return s.stylize(w, "string");
1301
- }
1302
- if (A(h))
1303
- return s.stylize("" + h, "number");
1304
- if (u(h))
1305
- return s.stylize("" + h, "boolean");
1306
- if (b(h))
1307
- return s.stylize("null", "null");
1308
- }
1309
- function D(s) {
1310
- return "[" + Error.prototype.toString.call(s) + "]";
1311
- }
1312
- function x(s, h, w, B, l) {
1313
- for (var f = [], p = 0, _ = h.length; p < _; ++p)
1314
- ee(h, String(p)) ? f.push(P(
1315
- s,
1316
- h,
1317
- w,
1318
- B,
1319
- String(p),
1320
- !0
1321
- )) : f.push("");
1322
- return l.forEach(function(j) {
1323
- j.match(/^\d+$/) || f.push(P(
1324
- s,
1325
- h,
1326
- w,
1327
- B,
1328
- j,
1329
- !0
1330
- ));
1331
- }), f;
1332
- }
1333
- function P(s, h, w, B, l, f) {
1334
- var p, _, j;
1335
- if (j = Object.getOwnPropertyDescriptor(h, l) || { value: h[l] }, j.get ? j.set ? _ = s.stylize("[Getter/Setter]", "special") : _ = s.stylize("[Getter]", "special") : j.set && (_ = s.stylize("[Setter]", "special")), ee(B, l) || (p = "[" + l + "]"), _ || (s.seen.indexOf(j.value) < 0 ? (b(w) ? _ = L(s, j.value, null) : _ = L(s, j.value, w - 1), _.indexOf(`
1336
- `) > -1 && (f ? _ = _.split(`
1337
- `).map(function(n) {
1338
- return " " + n;
1339
- }).join(`
1340
- `).slice(2) : _ = `
1341
- ` + _.split(`
1342
- `).map(function(n) {
1343
- return " " + n;
1344
- }).join(`
1345
- `))) : _ = s.stylize("[Circular]", "special")), W(p)) {
1346
- if (f && l.match(/^\d+$/))
1347
- return _;
1348
- p = JSON.stringify("" + l), p.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (p = p.slice(1, -1), p = s.stylize(p, "name")) : (p = p.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), p = s.stylize(p, "string"));
1349
- }
1350
- return p + ": " + _;
1351
- }
1352
- function M(s, h, w) {
1353
- var B = s.reduce(function(l, f) {
1354
- return f.indexOf(`
1355
- `) >= 0, l + f.replace(/\u001b\[\d\d?m/g, "").length + 1;
1356
- }, 0);
1357
- return B > 60 ? w[0] + (h === "" ? "" : h + `
1358
- `) + " " + s.join(`,
1359
- `) + " " + w[1] : w[0] + h + " " + s.join(", ") + " " + w[1];
1360
- }
1361
- e.types = Ur;
1362
- function R(s) {
1363
- return Array.isArray(s);
1364
- }
1365
- e.isArray = R;
1366
- function u(s) {
1367
- return typeof s == "boolean";
1368
- }
1369
- e.isBoolean = u;
1370
- function b(s) {
1371
- return s === null;
1372
- }
1373
- e.isNull = b;
1374
- function S(s) {
1375
- return s == null;
1376
- }
1377
- e.isNullOrUndefined = S;
1378
- function A(s) {
1379
- return typeof s == "number";
1380
- }
1381
- e.isNumber = A;
1382
- function T(s) {
1383
- return typeof s == "string";
1384
- }
1385
- e.isString = T;
1386
- function C(s) {
1387
- return typeof s == "symbol";
1388
- }
1389
- e.isSymbol = C;
1390
- function W(s) {
1391
- return s === void 0;
1392
- }
1393
- e.isUndefined = W;
1394
- function F(s) {
1395
- return I(s) && Z(s) === "[object RegExp]";
1396
- }
1397
- e.isRegExp = F, e.types.isRegExp = F;
1398
- function I(s) {
1399
- return typeof s == "object" && s !== null;
1400
- }
1401
- e.isObject = I;
1402
- function z(s) {
1403
- return I(s) && Z(s) === "[object Date]";
1404
- }
1405
- e.isDate = z, e.types.isDate = z;
1406
- function J(s) {
1407
- return I(s) && (Z(s) === "[object Error]" || s instanceof Error);
1408
- }
1409
- e.isError = J, e.types.isNativeError = J;
1410
- function Y(s) {
1411
- return typeof s == "function";
1412
- }
1413
- e.isFunction = Y;
1414
- function re(s) {
1415
- return s === null || typeof s == "boolean" || typeof s == "number" || typeof s == "string" || typeof s == "symbol" || // ES6 symbol
1416
- typeof s > "u";
1417
- }
1418
- e.isPrimitive = re, e.isBuffer = $o;
1419
- function Z(s) {
1420
- return Object.prototype.toString.call(s);
1421
- }
1422
- function ne(s) {
1423
- return s < 10 ? "0" + s.toString(10) : s.toString(10);
1424
- }
1425
- var ie = [
1426
- "Jan",
1427
- "Feb",
1428
- "Mar",
1429
- "Apr",
1430
- "May",
1431
- "Jun",
1432
- "Jul",
1433
- "Aug",
1434
- "Sep",
1435
- "Oct",
1436
- "Nov",
1437
- "Dec"
1438
- ];
1439
- function Q() {
1440
- var s = /* @__PURE__ */ new Date(), h = [
1441
- ne(s.getHours()),
1442
- ne(s.getMinutes()),
1443
- ne(s.getSeconds())
1444
- ].join(":");
1445
- return [s.getDate(), ie[s.getMonth()], h].join(" ");
1446
- }
1447
- e.log = function() {
1448
- console.log("%s - %s", Q(), e.format.apply(e, arguments));
1449
- }, e.inherits = me, e._extend = function(s, h) {
1450
- if (!h || !I(h)) return s;
1451
- for (var w = Object.keys(h), B = w.length; B--; )
1452
- s[w[B]] = h[w[B]];
1453
- return s;
1454
- };
1455
- function ee(s, h) {
1456
- return Object.prototype.hasOwnProperty.call(s, h);
1457
- }
1458
- var K = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
1459
- e.promisify = function(h) {
1460
- if (typeof h != "function")
1461
- throw new TypeError('The "original" argument must be of type Function');
1462
- if (K && h[K]) {
1463
- var w = h[K];
1464
- if (typeof w != "function")
1465
- throw new TypeError('The "util.promisify.custom" argument must be of type Function');
1466
- return Object.defineProperty(w, K, {
1467
- value: w,
1468
- enumerable: !1,
1469
- writable: !1,
1470
- configurable: !0
1471
- }), w;
1472
- }
1473
- function w() {
1474
- for (var B, l, f = new Promise(function(j, n) {
1475
- B = j, l = n;
1476
- }), p = [], _ = 0; _ < arguments.length; _++)
1477
- p.push(arguments[_]);
1478
- p.push(function(j, n) {
1479
- j ? l(j) : B(n);
1480
- });
1481
- try {
1482
- h.apply(this, p);
1483
- } catch (j) {
1484
- l(j);
1485
- }
1486
- return f;
1487
- }
1488
- return Object.setPrototypeOf(w, Object.getPrototypeOf(h)), K && Object.defineProperty(w, K, {
1489
- value: w,
1490
- enumerable: !1,
1491
- writable: !1,
1492
- configurable: !0
1493
- }), Object.defineProperties(
1494
- w,
1495
- t(h)
1496
- );
1497
- }, e.promisify.custom = K;
1498
- function te(s, h) {
1499
- if (!s) {
1500
- var w = new Error("Promise was rejected with a falsy value");
1501
- w.reason = s, s = w;
1502
- }
1503
- return h(s);
1504
- }
1505
- function ae(s) {
1506
- if (typeof s != "function")
1507
- throw new TypeError('The "original" argument must be of type Function');
1508
- function h() {
1509
- for (var w = [], B = 0; B < arguments.length; B++)
1510
- w.push(arguments[B]);
1511
- var l = w.pop();
1512
- if (typeof l != "function")
1513
- throw new TypeError("The last argument must be of type Function");
1514
- var f = this, p = function() {
1515
- return l.apply(f, arguments);
1516
- };
1517
- s.apply(this, w).then(
1518
- function(_) {
1519
- U.nextTick(p.bind(null, null, _));
1520
- },
1521
- function(_) {
1522
- U.nextTick(te.bind(null, _, p));
1523
- }
1524
- );
1525
- }
1526
- return Object.setPrototypeOf(h, Object.getPrototypeOf(s)), Object.defineProperties(
1527
- h,
1528
- t(s)
1529
- ), h;
1530
- }
1531
- e.callbackify = ae;
1532
- })(Dt);
1533
- var ht, yr;
1534
- function Uo() {
1535
- if (yr) return ht;
1536
- yr = 1;
1537
- function e(P, M) {
1538
- var R = Object.keys(P);
1539
- if (Object.getOwnPropertySymbols) {
1540
- var u = Object.getOwnPropertySymbols(P);
1541
- M && (u = u.filter(function(b) {
1542
- return Object.getOwnPropertyDescriptor(P, b).enumerable;
1543
- })), R.push.apply(R, u);
1544
- }
1545
- return R;
1546
- }
1547
- function t(P) {
1548
- for (var M = 1; M < arguments.length; M++) {
1549
- var R = arguments[M] != null ? arguments[M] : {};
1550
- M % 2 ? e(Object(R), !0).forEach(function(u) {
1551
- r(P, u, R[u]);
1552
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(P, Object.getOwnPropertyDescriptors(R)) : e(Object(R)).forEach(function(u) {
1553
- Object.defineProperty(P, u, Object.getOwnPropertyDescriptor(R, u));
1554
- });
1555
- }
1556
- return P;
1557
- }
1558
- function r(P, M, R) {
1559
- return M = c(M), M in P ? Object.defineProperty(P, M, { value: R, enumerable: !0, configurable: !0, writable: !0 }) : P[M] = R, P;
1560
- }
1561
- function o(P, M) {
1562
- if (!(P instanceof M))
1563
- throw new TypeError("Cannot call a class as a function");
1564
- }
1565
- function a(P, M) {
1566
- for (var R = 0; R < M.length; R++) {
1567
- var u = M[R];
1568
- u.enumerable = u.enumerable || !1, u.configurable = !0, "value" in u && (u.writable = !0), Object.defineProperty(P, c(u.key), u);
1569
- }
1570
- }
1571
- function d(P, M, R) {
1572
- return M && a(P.prototype, M), Object.defineProperty(P, "prototype", { writable: !1 }), P;
1573
- }
1574
- function c(P) {
1575
- var M = m(P, "string");
1576
- return typeof M == "symbol" ? M : String(M);
1577
- }
1578
- function m(P, M) {
1579
- if (typeof P != "object" || P === null) return P;
1580
- var R = P[Symbol.toPrimitive];
1581
- if (R !== void 0) {
1582
- var u = R.call(P, M);
1583
- if (typeof u != "object") return u;
1584
- throw new TypeError("@@toPrimitive must return a primitive value.");
1585
- }
1586
- return String(P);
1587
- }
1588
- var y = Ve, E = y.Buffer, L = Dt, N = L.inspect, D = N && N.custom || "inspect";
1589
- function x(P, M, R) {
1590
- E.prototype.copy.call(P, M, R);
1591
- }
1592
- return ht = /* @__PURE__ */ function() {
1593
- function P() {
1594
- o(this, P), this.head = null, this.tail = null, this.length = 0;
1595
- }
1596
- return d(P, [{
1597
- key: "push",
1598
- value: function(R) {
1599
- var u = {
1600
- data: R,
1601
- next: null
1602
- };
1603
- this.length > 0 ? this.tail.next = u : this.head = u, this.tail = u, ++this.length;
1604
- }
1605
- }, {
1606
- key: "unshift",
1607
- value: function(R) {
1608
- var u = {
1609
- data: R,
1610
- next: this.head
1611
- };
1612
- this.length === 0 && (this.tail = u), this.head = u, ++this.length;
1613
- }
1614
- }, {
1615
- key: "shift",
1616
- value: function() {
1617
- if (this.length !== 0) {
1618
- var R = this.head.data;
1619
- return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, R;
1620
- }
1621
- }
1622
- }, {
1623
- key: "clear",
1624
- value: function() {
1625
- this.head = this.tail = null, this.length = 0;
1626
- }
1627
- }, {
1628
- key: "join",
1629
- value: function(R) {
1630
- if (this.length === 0) return "";
1631
- for (var u = this.head, b = "" + u.data; u = u.next; ) b += R + u.data;
1632
- return b;
1633
- }
1634
- }, {
1635
- key: "concat",
1636
- value: function(R) {
1637
- if (this.length === 0) return E.alloc(0);
1638
- for (var u = E.allocUnsafe(R >>> 0), b = this.head, S = 0; b; )
1639
- x(b.data, u, S), S += b.data.length, b = b.next;
1640
- return u;
1641
- }
1642
- // Consumes a specified amount of bytes or characters from the buffered data.
1643
- }, {
1644
- key: "consume",
1645
- value: function(R, u) {
1646
- var b;
1647
- return R < this.head.data.length ? (b = this.head.data.slice(0, R), this.head.data = this.head.data.slice(R)) : R === this.head.data.length ? b = this.shift() : b = u ? this._getString(R) : this._getBuffer(R), b;
1648
- }
1649
- }, {
1650
- key: "first",
1651
- value: function() {
1652
- return this.head.data;
1653
- }
1654
- // Consumes a specified amount of characters from the buffered data.
1655
- }, {
1656
- key: "_getString",
1657
- value: function(R) {
1658
- var u = this.head, b = 1, S = u.data;
1659
- for (R -= S.length; u = u.next; ) {
1660
- var A = u.data, T = R > A.length ? A.length : R;
1661
- if (T === A.length ? S += A : S += A.slice(0, R), R -= T, R === 0) {
1662
- T === A.length ? (++b, u.next ? this.head = u.next : this.head = this.tail = null) : (this.head = u, u.data = A.slice(T));
1663
- break;
1664
- }
1665
- ++b;
1666
- }
1667
- return this.length -= b, S;
1668
- }
1669
- // Consumes a specified amount of bytes from the buffered data.
1670
- }, {
1671
- key: "_getBuffer",
1672
- value: function(R) {
1673
- var u = E.allocUnsafe(R), b = this.head, S = 1;
1674
- for (b.data.copy(u), R -= b.data.length; b = b.next; ) {
1675
- var A = b.data, T = R > A.length ? A.length : R;
1676
- if (A.copy(u, u.length - R, 0, T), R -= T, R === 0) {
1677
- T === A.length ? (++S, b.next ? this.head = b.next : this.head = this.tail = null) : (this.head = b, b.data = A.slice(T));
1678
- break;
1679
- }
1680
- ++S;
1681
- }
1682
- return this.length -= S, u;
1683
- }
1684
- // Make sure the linked list only shows the minimal necessary information.
1685
- }, {
1686
- key: D,
1687
- value: function(R, u) {
1688
- return N(this, t(t({}, u), {}, {
1689
- // Only inspect one level.
1690
- depth: 0,
1691
- // It should not recurse.
1692
- customInspect: !1
1693
- }));
1694
- }
1695
- }]), P;
1696
- }(), ht;
1697
- }
1698
- function ko(e, t) {
1699
- var r = this, o = this._readableState && this._readableState.destroyed, a = this._writableState && this._writableState.destroyed;
1700
- return o || a ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, U.nextTick(Nt, this, e)) : U.nextTick(Nt, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function(d) {
1701
- !t && d ? r._writableState ? r._writableState.errorEmitted ? U.nextTick(ke, r) : (r._writableState.errorEmitted = !0, U.nextTick(hr, r, d)) : U.nextTick(hr, r, d) : t ? (U.nextTick(ke, r), t(d)) : U.nextTick(ke, r);
1702
- }), this);
1703
- }
1704
- function hr(e, t) {
1705
- Nt(e, t), ke(e);
1706
- }
1707
- function ke(e) {
1708
- e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit("close");
1709
- }
1710
- function Wo() {
1711
- this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
1712
- }
1713
- function Nt(e, t) {
1714
- e.emit("error", t);
1715
- }
1716
- function xo(e, t) {
1717
- var r = e._readableState, o = e._writableState;
1718
- r && r.autoDestroy || o && o.autoDestroy ? e.destroy(t) : e.emit("error", t);
1719
- }
1720
- var sn = {
1721
- destroy: ko,
1722
- undestroy: Wo,
1723
- errorOrDestroy: xo
1724
- }, se = {};
1725
- function qo(e, t) {
1726
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
1727
- }
1728
- var cn = {};
1729
- function X(e, t, r) {
1730
- r || (r = Error);
1731
- function o(d, c, m) {
1732
- return typeof t == "string" ? t : t(d, c, m);
1733
- }
1734
- var a = /* @__PURE__ */ function(d) {
1735
- qo(c, d);
1736
- function c(m, y, E) {
1737
- return d.call(this, o(m, y, E)) || this;
1738
- }
1739
- return c;
1740
- }(r);
1741
- a.prototype.name = r.name, a.prototype.code = e, cn[e] = a;
1742
- }
1743
- function gr(e, t) {
1744
- if (Array.isArray(e)) {
1745
- var r = e.length;
1746
- return e = e.map(function(o) {
1747
- return String(o);
1748
- }), r > 2 ? "one of ".concat(t, " ").concat(e.slice(0, r - 1).join(", "), ", or ") + e[r - 1] : r === 2 ? "one of ".concat(t, " ").concat(e[0], " or ").concat(e[1]) : "of ".concat(t, " ").concat(e[0]);
1749
- } else
1750
- return "of ".concat(t, " ").concat(String(e));
1751
- }
1752
- function Go(e, t, r) {
1753
- return e.substr(0, t.length) === t;
1754
- }
1755
- function Ho(e, t, r) {
1756
- return (r === void 0 || r > e.length) && (r = e.length), e.substring(r - t.length, r) === t;
1757
- }
1758
- function Vo(e, t, r) {
1759
- return typeof r != "number" && (r = 0), r + t.length > e.length ? !1 : e.indexOf(t, r) !== -1;
1760
- }
1761
- X("ERR_INVALID_OPT_VALUE", function(e, t) {
1762
- return 'The value "' + t + '" is invalid for option "' + e + '"';
1763
- }, TypeError);
1764
- X("ERR_INVALID_ARG_TYPE", function(e, t, r) {
1765
- var o;
1766
- typeof t == "string" && Go(t, "not ") ? (o = "must not be", t = t.replace(/^not /, "")) : o = "must be";
1767
- var a;
1768
- if (Ho(e, " argument"))
1769
- a = "The ".concat(e, " ").concat(o, " ").concat(gr(t, "type"));
1770
- else {
1771
- var d = Vo(e, ".") ? "property" : "argument";
1772
- a = 'The "'.concat(e, '" ').concat(d, " ").concat(o, " ").concat(gr(t, "type"));
1773
- }
1774
- return a += ". Received type ".concat(typeof r), a;
1775
- }, TypeError);
1776
- X("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
1777
- X("ERR_METHOD_NOT_IMPLEMENTED", function(e) {
1778
- return "The " + e + " method is not implemented";
1779
- });
1780
- X("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
1781
- X("ERR_STREAM_DESTROYED", function(e) {
1782
- return "Cannot call " + e + " after a stream was destroyed";
1783
- });
1784
- X("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
1785
- X("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
1786
- X("ERR_STREAM_WRITE_AFTER_END", "write after end");
1787
- X("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError);
1788
- X("ERR_UNKNOWN_ENCODING", function(e) {
1789
- return "Unknown encoding: " + e;
1790
- }, TypeError);
1791
- X("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
1792
- se.codes = cn;
1793
- var zo = se.codes.ERR_INVALID_OPT_VALUE;
1794
- function Ko(e, t, r) {
1795
- return e.highWaterMark != null ? e.highWaterMark : t ? e[r] : null;
1796
- }
1797
- function Jo(e, t, r, o) {
1798
- var a = Ko(t, o, r);
1799
- if (a != null) {
1800
- if (!(isFinite(a) && Math.floor(a) === a) || a < 0) {
1801
- var d = o ? r : "highWaterMark";
1802
- throw new zo(d, a);
1803
- }
1804
- return Math.floor(a);
1805
- }
1806
- return e.objectMode ? 16 : 16 * 1024;
1807
- }
1808
- var dn = {
1809
- getHighWaterMark: Jo
1810
- }, Yo = Zo;
1811
- function Zo(e, t) {
1812
- if (gt("noDeprecation"))
1813
- return e;
1814
- var r = !1;
1815
- function o() {
1816
- if (!r) {
1817
- if (gt("throwDeprecation"))
1818
- throw new Error(t);
1819
- gt("traceDeprecation") ? console.trace(t) : console.warn(t), r = !0;
1820
- }
1821
- return e.apply(this, arguments);
1822
- }
1823
- return o;
1824
- }
1825
- function gt(e) {
1826
- try {
1827
- if (!ue.localStorage) return !1;
1828
- } catch {
1829
- return !1;
1830
- }
1831
- var t = ue.localStorage[e];
1832
- return t == null ? !1 : String(t).toLowerCase() === "true";
1833
- }
1834
- var vt, vr;
1835
- function Xo() {
1836
- if (vr) return vt;
1837
- vr = 1, vt = F;
1838
- function e(l) {
1839
- var f = this;
1840
- this.next = null, this.entry = null, this.finish = function() {
1841
- B(f, l);
1842
- };
1843
- }
1844
- var t;
1845
- F.WritableState = C;
1846
- var r = {
1847
- deprecate: Yo
1848
- }, o = $r, a = Ve.Buffer, d = (typeof ue < "u" ? ue : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
1849
- };
1850
- function c(l) {
1851
- return a.from(l);
1852
- }
1853
- function m(l) {
1854
- return a.isBuffer(l) || l instanceof d;
1855
- }
1856
- var y = sn, E = dn, L = E.getHighWaterMark, N = se.codes, D = N.ERR_INVALID_ARG_TYPE, x = N.ERR_METHOD_NOT_IMPLEMENTED, P = N.ERR_MULTIPLE_CALLBACK, M = N.ERR_STREAM_CANNOT_PIPE, R = N.ERR_STREAM_DESTROYED, u = N.ERR_STREAM_NULL_VALUES, b = N.ERR_STREAM_WRITE_AFTER_END, S = N.ERR_UNKNOWN_ENCODING, A = y.errorOrDestroy;
1857
- me(F, o);
1858
- function T() {
1859
- }
1860
- function C(l, f, p) {
1861
- t = t || Ae(), l = l || {}, typeof p != "boolean" && (p = f instanceof t), this.objectMode = !!l.objectMode, p && (this.objectMode = this.objectMode || !!l.writableObjectMode), this.highWaterMark = L(this, l, "writableHighWaterMark", p), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
1862
- var _ = l.decodeStrings === !1;
1863
- this.decodeStrings = !_, this.defaultEncoding = l.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(j) {
1864
- ie(f, j);
1865
- }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = l.emitClose !== !1, this.autoDestroy = !!l.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new e(this);
1866
- }
1867
- C.prototype.getBuffer = function() {
1868
- for (var f = this.bufferedRequest, p = []; f; )
1869
- p.push(f), f = f.next;
1870
- return p;
1871
- }, function() {
1872
- try {
1873
- Object.defineProperty(C.prototype, "buffer", {
1874
- get: r.deprecate(function() {
1875
- return this.getBuffer();
1876
- }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
1877
- });
1878
- } catch {
1879
- }
1880
- }();
1881
- var W;
1882
- typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (W = Function.prototype[Symbol.hasInstance], Object.defineProperty(F, Symbol.hasInstance, {
1883
- value: function(f) {
1884
- return W.call(this, f) ? !0 : this !== F ? !1 : f && f._writableState instanceof C;
1885
- }
1886
- })) : W = function(f) {
1887
- return f instanceof this;
1888
- };
1889
- function F(l) {
1890
- t = t || Ae();
1891
- var f = this instanceof t;
1892
- if (!f && !W.call(F, this)) return new F(l);
1893
- this._writableState = new C(l, this, f), this.writable = !0, l && (typeof l.write == "function" && (this._write = l.write), typeof l.writev == "function" && (this._writev = l.writev), typeof l.destroy == "function" && (this._destroy = l.destroy), typeof l.final == "function" && (this._final = l.final)), o.call(this);
1894
- }
1895
- F.prototype.pipe = function() {
1896
- A(this, new M());
1897
- };
1898
- function I(l, f) {
1899
- var p = new b();
1900
- A(l, p), U.nextTick(f, p);
1901
- }
1902
- function z(l, f, p, _) {
1903
- var j;
1904
- return p === null ? j = new u() : typeof p != "string" && !f.objectMode && (j = new D("chunk", ["string", "Buffer"], p)), j ? (A(l, j), U.nextTick(_, j), !1) : !0;
1905
- }
1906
- F.prototype.write = function(l, f, p) {
1907
- var _ = this._writableState, j = !1, n = !_.objectMode && m(l);
1908
- return n && !a.isBuffer(l) && (l = c(l)), typeof f == "function" && (p = f, f = null), n ? f = "buffer" : f || (f = _.defaultEncoding), typeof p != "function" && (p = T), _.ending ? I(this, p) : (n || z(this, _, l, p)) && (_.pendingcb++, j = Y(this, _, n, l, f, p)), j;
1909
- }, F.prototype.cork = function() {
1910
- this._writableState.corked++;
1911
- }, F.prototype.uncork = function() {
1912
- var l = this._writableState;
1913
- l.corked && (l.corked--, !l.writing && !l.corked && !l.bufferProcessing && l.bufferedRequest && K(this, l));
1914
- }, F.prototype.setDefaultEncoding = function(f) {
1915
- if (typeof f == "string" && (f = f.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((f + "").toLowerCase()) > -1)) throw new S(f);
1916
- return this._writableState.defaultEncoding = f, this;
1917
- }, Object.defineProperty(F.prototype, "writableBuffer", {
1918
- // making it explicit this property is not enumerable
1919
- // because otherwise some prototype manipulation in
1920
- // userland will fail
1921
- enumerable: !1,
1922
- get: function() {
1923
- return this._writableState && this._writableState.getBuffer();
1924
- }
1925
- });
1926
- function J(l, f, p) {
1927
- return !l.objectMode && l.decodeStrings !== !1 && typeof f == "string" && (f = a.from(f, p)), f;
1928
- }
1929
- Object.defineProperty(F.prototype, "writableHighWaterMark", {
1930
- // making it explicit this property is not enumerable
1931
- // because otherwise some prototype manipulation in
1932
- // userland will fail
1933
- enumerable: !1,
1934
- get: function() {
1935
- return this._writableState.highWaterMark;
1936
- }
1937
- });
1938
- function Y(l, f, p, _, j, n) {
1939
- if (!p) {
1940
- var i = J(f, _, j);
1941
- _ !== i && (p = !0, j = "buffer", _ = i);
1942
- }
1943
- var v = f.objectMode ? 1 : _.length;
1944
- f.length += v;
1945
- var O = f.length < f.highWaterMark;
1946
- if (O || (f.needDrain = !0), f.writing || f.corked) {
1947
- var H = f.lastBufferedRequest;
1948
- f.lastBufferedRequest = {
1949
- chunk: _,
1950
- encoding: j,
1951
- isBuf: p,
1952
- callback: n,
1953
- next: null
1954
- }, H ? H.next = f.lastBufferedRequest : f.bufferedRequest = f.lastBufferedRequest, f.bufferedRequestCount += 1;
1955
- } else
1956
- re(l, f, !1, v, _, j, n);
1957
- return O;
1958
- }
1959
- function re(l, f, p, _, j, n, i) {
1960
- f.writelen = _, f.writecb = i, f.writing = !0, f.sync = !0, f.destroyed ? f.onwrite(new R("write")) : p ? l._writev(j, f.onwrite) : l._write(j, n, f.onwrite), f.sync = !1;
1961
- }
1962
- function Z(l, f, p, _, j) {
1963
- --f.pendingcb, p ? (U.nextTick(j, _), U.nextTick(h, l, f), l._writableState.errorEmitted = !0, A(l, _)) : (j(_), l._writableState.errorEmitted = !0, A(l, _), h(l, f));
1964
- }
1965
- function ne(l) {
1966
- l.writing = !1, l.writecb = null, l.length -= l.writelen, l.writelen = 0;
1967
- }
1968
- function ie(l, f) {
1969
- var p = l._writableState, _ = p.sync, j = p.writecb;
1970
- if (typeof j != "function") throw new P();
1971
- if (ne(p), f) Z(l, p, _, f, j);
1972
- else {
1973
- var n = te(p) || l.destroyed;
1974
- !n && !p.corked && !p.bufferProcessing && p.bufferedRequest && K(l, p), _ ? U.nextTick(Q, l, p, n, j) : Q(l, p, n, j);
1975
- }
1976
- }
1977
- function Q(l, f, p, _) {
1978
- p || ee(l, f), f.pendingcb--, _(), h(l, f);
1979
- }
1980
- function ee(l, f) {
1981
- f.length === 0 && f.needDrain && (f.needDrain = !1, l.emit("drain"));
1982
- }
1983
- function K(l, f) {
1984
- f.bufferProcessing = !0;
1985
- var p = f.bufferedRequest;
1986
- if (l._writev && p && p.next) {
1987
- var _ = f.bufferedRequestCount, j = new Array(_), n = f.corkedRequestsFree;
1988
- n.entry = p;
1989
- for (var i = 0, v = !0; p; )
1990
- j[i] = p, p.isBuf || (v = !1), p = p.next, i += 1;
1991
- j.allBuffers = v, re(l, f, !0, f.length, j, "", n.finish), f.pendingcb++, f.lastBufferedRequest = null, n.next ? (f.corkedRequestsFree = n.next, n.next = null) : f.corkedRequestsFree = new e(f), f.bufferedRequestCount = 0;
1992
- } else {
1993
- for (; p; ) {
1994
- var O = p.chunk, H = p.encoding, $ = p.callback, q = f.objectMode ? 1 : O.length;
1995
- if (re(l, f, !1, q, O, H, $), p = p.next, f.bufferedRequestCount--, f.writing)
1996
- break;
1997
- }
1998
- p === null && (f.lastBufferedRequest = null);
1999
- }
2000
- f.bufferedRequest = p, f.bufferProcessing = !1;
2001
- }
2002
- F.prototype._write = function(l, f, p) {
2003
- p(new x("_write()"));
2004
- }, F.prototype._writev = null, F.prototype.end = function(l, f, p) {
2005
- var _ = this._writableState;
2006
- return typeof l == "function" ? (p = l, l = null, f = null) : typeof f == "function" && (p = f, f = null), l != null && this.write(l, f), _.corked && (_.corked = 1, this.uncork()), _.ending || w(this, _, p), this;
2007
- }, Object.defineProperty(F.prototype, "writableLength", {
2008
- // making it explicit this property is not enumerable
2009
- // because otherwise some prototype manipulation in
2010
- // userland will fail
2011
- enumerable: !1,
2012
- get: function() {
2013
- return this._writableState.length;
2014
- }
2015
- });
2016
- function te(l) {
2017
- return l.ending && l.length === 0 && l.bufferedRequest === null && !l.finished && !l.writing;
2018
- }
2019
- function ae(l, f) {
2020
- l._final(function(p) {
2021
- f.pendingcb--, p && A(l, p), f.prefinished = !0, l.emit("prefinish"), h(l, f);
2022
- });
2023
- }
2024
- function s(l, f) {
2025
- !f.prefinished && !f.finalCalled && (typeof l._final == "function" && !f.destroyed ? (f.pendingcb++, f.finalCalled = !0, U.nextTick(ae, l, f)) : (f.prefinished = !0, l.emit("prefinish")));
2026
- }
2027
- function h(l, f) {
2028
- var p = te(f);
2029
- if (p && (s(l, f), f.pendingcb === 0 && (f.finished = !0, l.emit("finish"), f.autoDestroy))) {
2030
- var _ = l._readableState;
2031
- (!_ || _.autoDestroy && _.endEmitted) && l.destroy();
2032
- }
2033
- return p;
2034
- }
2035
- function w(l, f, p) {
2036
- f.ending = !0, h(l, f), p && (f.finished ? U.nextTick(p) : l.once("finish", p)), f.ended = !0, l.writable = !1;
2037
- }
2038
- function B(l, f, p) {
2039
- var _ = l.entry;
2040
- for (l.entry = null; _; ) {
2041
- var j = _.callback;
2042
- f.pendingcb--, j(p), _ = _.next;
2043
- }
2044
- f.corkedRequestsFree.next = l;
2045
- }
2046
- return Object.defineProperty(F.prototype, "destroyed", {
2047
- // making it explicit this property is not enumerable
2048
- // because otherwise some prototype manipulation in
2049
- // userland will fail
2050
- enumerable: !1,
2051
- get: function() {
2052
- return this._writableState === void 0 ? !1 : this._writableState.destroyed;
2053
- },
2054
- set: function(f) {
2055
- this._writableState && (this._writableState.destroyed = f);
2056
- }
2057
- }), F.prototype.destroy = y.destroy, F.prototype._undestroy = y.undestroy, F.prototype._destroy = function(l, f) {
2058
- f(l);
2059
- }, vt;
2060
- }
2061
- var bt, br;
2062
- function Ae() {
2063
- if (br) return bt;
2064
- br = 1;
2065
- var e = Object.keys || function(E) {
2066
- var L = [];
2067
- for (var N in E) L.push(N);
2068
- return L;
2069
- };
2070
- bt = c;
2071
- var t = oa(), r = Xo();
2072
- me(c, t);
2073
- for (var o = e(r.prototype), a = 0; a < o.length; a++) {
2074
- var d = o[a];
2075
- c.prototype[d] || (c.prototype[d] = r.prototype[d]);
2076
- }
2077
- function c(E) {
2078
- if (!(this instanceof c)) return new c(E);
2079
- t.call(this, E), r.call(this, E), this.allowHalfOpen = !0, E && (E.readable === !1 && (this.readable = !1), E.writable === !1 && (this.writable = !1), E.allowHalfOpen === !1 && (this.allowHalfOpen = !1, this.once("end", m)));
2080
- }
2081
- Object.defineProperty(c.prototype, "writableHighWaterMark", {
2082
- // making it explicit this property is not enumerable
2083
- // because otherwise some prototype manipulation in
2084
- // userland will fail
2085
- enumerable: !1,
2086
- get: function() {
2087
- return this._writableState.highWaterMark;
2088
- }
2089
- }), Object.defineProperty(c.prototype, "writableBuffer", {
2090
- // making it explicit this property is not enumerable
2091
- // because otherwise some prototype manipulation in
2092
- // userland will fail
2093
- enumerable: !1,
2094
- get: function() {
2095
- return this._writableState && this._writableState.getBuffer();
2096
- }
2097
- }), Object.defineProperty(c.prototype, "writableLength", {
2098
- // making it explicit this property is not enumerable
2099
- // because otherwise some prototype manipulation in
2100
- // userland will fail
2101
- enumerable: !1,
2102
- get: function() {
2103
- return this._writableState.length;
2104
- }
2105
- });
2106
- function m() {
2107
- this._writableState.ended || U.nextTick(y, this);
2108
- }
2109
- function y(E) {
2110
- E.end();
2111
- }
2112
- return Object.defineProperty(c.prototype, "destroyed", {
2113
- // making it explicit this property is not enumerable
2114
- // because otherwise some prototype manipulation in
2115
- // userland will fail
2116
- enumerable: !1,
2117
- get: function() {
2118
- return this._readableState === void 0 || this._writableState === void 0 ? !1 : this._readableState.destroyed && this._writableState.destroyed;
2119
- },
2120
- set: function(L) {
2121
- this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = L, this._writableState.destroyed = L);
2122
- }
2123
- }), bt;
2124
- }
2125
- var wt = {}, Ie = { exports: {} };
2126
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
2127
- var wr;
2128
- function Qo() {
2129
- return wr || (wr = 1, function(e, t) {
2130
- var r = Ve, o = r.Buffer;
2131
- function a(c, m) {
2132
- for (var y in c)
2133
- m[y] = c[y];
2134
- }
2135
- o.from && o.alloc && o.allocUnsafe && o.allocUnsafeSlow ? e.exports = r : (a(r, t), t.Buffer = d);
2136
- function d(c, m, y) {
2137
- return o(c, m, y);
2138
- }
2139
- d.prototype = Object.create(o.prototype), a(o, d), d.from = function(c, m, y) {
2140
- if (typeof c == "number")
2141
- throw new TypeError("Argument must not be a number");
2142
- return o(c, m, y);
2143
- }, d.alloc = function(c, m, y) {
2144
- if (typeof c != "number")
2145
- throw new TypeError("Argument must be a number");
2146
- var E = o(c);
2147
- return m !== void 0 ? typeof y == "string" ? E.fill(m, y) : E.fill(m) : E.fill(0), E;
2148
- }, d.allocUnsafe = function(c) {
2149
- if (typeof c != "number")
2150
- throw new TypeError("Argument must be a number");
2151
- return o(c);
2152
- }, d.allocUnsafeSlow = function(c) {
2153
- if (typeof c != "number")
2154
- throw new TypeError("Argument must be a number");
2155
- return r.SlowBuffer(c);
2156
- };
2157
- }(Ie, Ie.exports)), Ie.exports;
2158
- }
2159
- var mr;
2160
- function _r() {
2161
- if (mr) return wt;
2162
- mr = 1;
2163
- var e = Qo().Buffer, t = e.isEncoding || function(u) {
2164
- switch (u = "" + u, u && u.toLowerCase()) {
2165
- case "hex":
2166
- case "utf8":
2167
- case "utf-8":
2168
- case "ascii":
2169
- case "binary":
2170
- case "base64":
2171
- case "ucs2":
2172
- case "ucs-2":
2173
- case "utf16le":
2174
- case "utf-16le":
2175
- case "raw":
2176
- return !0;
2177
- default:
2178
- return !1;
2179
- }
2180
- };
2181
- function r(u) {
2182
- if (!u) return "utf8";
2183
- for (var b; ; )
2184
- switch (u) {
2185
- case "utf8":
2186
- case "utf-8":
2187
- return "utf8";
2188
- case "ucs2":
2189
- case "ucs-2":
2190
- case "utf16le":
2191
- case "utf-16le":
2192
- return "utf16le";
2193
- case "latin1":
2194
- case "binary":
2195
- return "latin1";
2196
- case "base64":
2197
- case "ascii":
2198
- case "hex":
2199
- return u;
2200
- default:
2201
- if (b) return;
2202
- u = ("" + u).toLowerCase(), b = !0;
2203
- }
2204
- }
2205
- function o(u) {
2206
- var b = r(u);
2207
- if (typeof b != "string" && (e.isEncoding === t || !t(u))) throw new Error("Unknown encoding: " + u);
2208
- return b || u;
2209
- }
2210
- wt.StringDecoder = a;
2211
- function a(u) {
2212
- this.encoding = o(u);
2213
- var b;
2214
- switch (this.encoding) {
2215
- case "utf16le":
2216
- this.text = N, this.end = D, b = 4;
2217
- break;
2218
- case "utf8":
2219
- this.fillLast = y, b = 4;
2220
- break;
2221
- case "base64":
2222
- this.text = x, this.end = P, b = 3;
2223
- break;
2224
- default:
2225
- this.write = M, this.end = R;
2226
- return;
2227
- }
2228
- this.lastNeed = 0, this.lastTotal = 0, this.lastChar = e.allocUnsafe(b);
2229
- }
2230
- a.prototype.write = function(u) {
2231
- if (u.length === 0) return "";
2232
- var b, S;
2233
- if (this.lastNeed) {
2234
- if (b = this.fillLast(u), b === void 0) return "";
2235
- S = this.lastNeed, this.lastNeed = 0;
2236
- } else
2237
- S = 0;
2238
- return S < u.length ? b ? b + this.text(u, S) : this.text(u, S) : b || "";
2239
- }, a.prototype.end = L, a.prototype.text = E, a.prototype.fillLast = function(u) {
2240
- if (this.lastNeed <= u.length)
2241
- return u.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
2242
- u.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, u.length), this.lastNeed -= u.length;
2243
- };
2244
- function d(u) {
2245
- return u <= 127 ? 0 : u >> 5 === 6 ? 2 : u >> 4 === 14 ? 3 : u >> 3 === 30 ? 4 : u >> 6 === 2 ? -1 : -2;
2246
- }
2247
- function c(u, b, S) {
2248
- var A = b.length - 1;
2249
- if (A < S) return 0;
2250
- var T = d(b[A]);
2251
- return T >= 0 ? (T > 0 && (u.lastNeed = T - 1), T) : --A < S || T === -2 ? 0 : (T = d(b[A]), T >= 0 ? (T > 0 && (u.lastNeed = T - 2), T) : --A < S || T === -2 ? 0 : (T = d(b[A]), T >= 0 ? (T > 0 && (T === 2 ? T = 0 : u.lastNeed = T - 3), T) : 0));
2252
- }
2253
- function m(u, b, S) {
2254
- if ((b[0] & 192) !== 128)
2255
- return u.lastNeed = 0, "�";
2256
- if (u.lastNeed > 1 && b.length > 1) {
2257
- if ((b[1] & 192) !== 128)
2258
- return u.lastNeed = 1, "�";
2259
- if (u.lastNeed > 2 && b.length > 2 && (b[2] & 192) !== 128)
2260
- return u.lastNeed = 2, "�";
2261
- }
2262
- }
2263
- function y(u) {
2264
- var b = this.lastTotal - this.lastNeed, S = m(this, u);
2265
- if (S !== void 0) return S;
2266
- if (this.lastNeed <= u.length)
2267
- return u.copy(this.lastChar, b, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
2268
- u.copy(this.lastChar, b, 0, u.length), this.lastNeed -= u.length;
2269
- }
2270
- function E(u, b) {
2271
- var S = c(this, u, b);
2272
- if (!this.lastNeed) return u.toString("utf8", b);
2273
- this.lastTotal = S;
2274
- var A = u.length - (S - this.lastNeed);
2275
- return u.copy(this.lastChar, 0, A), u.toString("utf8", b, A);
2276
- }
2277
- function L(u) {
2278
- var b = u && u.length ? this.write(u) : "";
2279
- return this.lastNeed ? b + "�" : b;
2280
- }
2281
- function N(u, b) {
2282
- if ((u.length - b) % 2 === 0) {
2283
- var S = u.toString("utf16le", b);
2284
- if (S) {
2285
- var A = S.charCodeAt(S.length - 1);
2286
- if (A >= 55296 && A <= 56319)
2287
- return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = u[u.length - 2], this.lastChar[1] = u[u.length - 1], S.slice(0, -1);
2288
- }
2289
- return S;
2290
- }
2291
- return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = u[u.length - 1], u.toString("utf16le", b, u.length - 1);
2292
- }
2293
- function D(u) {
2294
- var b = u && u.length ? this.write(u) : "";
2295
- if (this.lastNeed) {
2296
- var S = this.lastTotal - this.lastNeed;
2297
- return b + this.lastChar.toString("utf16le", 0, S);
2298
- }
2299
- return b;
2300
- }
2301
- function x(u, b) {
2302
- var S = (u.length - b) % 3;
2303
- return S === 0 ? u.toString("base64", b) : (this.lastNeed = 3 - S, this.lastTotal = 3, S === 1 ? this.lastChar[0] = u[u.length - 1] : (this.lastChar[0] = u[u.length - 2], this.lastChar[1] = u[u.length - 1]), u.toString("base64", b, u.length - S));
2304
- }
2305
- function P(u) {
2306
- var b = u && u.length ? this.write(u) : "";
2307
- return this.lastNeed ? b + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : b;
2308
- }
2309
- function M(u) {
2310
- return u.toString(this.encoding);
2311
- }
2312
- function R(u) {
2313
- return u && u.length ? this.write(u) : "";
2314
- }
2315
- return wt;
2316
- }
2317
- var Sr = se.codes.ERR_STREAM_PREMATURE_CLOSE;
2318
- function ea(e) {
2319
- var t = !1;
2320
- return function() {
2321
- if (!t) {
2322
- t = !0;
2323
- for (var r = arguments.length, o = new Array(r), a = 0; a < r; a++)
2324
- o[a] = arguments[a];
2325
- e.apply(this, o);
2326
- }
2327
- };
2328
- }
2329
- function ta() {
2330
- }
2331
- function ra(e) {
2332
- return e.setHeader && typeof e.abort == "function";
2333
- }
2334
- function pn(e, t, r) {
2335
- if (typeof t == "function") return pn(e, null, t);
2336
- t || (t = {}), r = ea(r || ta);
2337
- var o = t.readable || t.readable !== !1 && e.readable, a = t.writable || t.writable !== !1 && e.writable, d = function() {
2338
- e.writable || m();
2339
- }, c = e._writableState && e._writableState.finished, m = function() {
2340
- a = !1, c = !0, o || r.call(e);
2341
- }, y = e._readableState && e._readableState.endEmitted, E = function() {
2342
- o = !1, y = !0, a || r.call(e);
2343
- }, L = function(P) {
2344
- r.call(e, P);
2345
- }, N = function() {
2346
- var P;
2347
- if (o && !y)
2348
- return (!e._readableState || !e._readableState.ended) && (P = new Sr()), r.call(e, P);
2349
- if (a && !c)
2350
- return (!e._writableState || !e._writableState.ended) && (P = new Sr()), r.call(e, P);
2351
- }, D = function() {
2352
- e.req.on("finish", m);
2353
- };
2354
- return ra(e) ? (e.on("complete", m), e.on("abort", N), e.req ? D() : e.on("request", D)) : a && !e._writableState && (e.on("end", d), e.on("close", d)), e.on("end", E), e.on("finish", m), t.error !== !1 && e.on("error", L), e.on("close", N), function() {
2355
- e.removeListener("complete", m), e.removeListener("abort", N), e.removeListener("request", D), e.req && e.req.removeListener("finish", m), e.removeListener("end", d), e.removeListener("close", d), e.removeListener("finish", m), e.removeListener("end", E), e.removeListener("error", L), e.removeListener("close", N);
2356
- };
2357
- }
2358
- var yn = pn, mt, Er;
2359
- function na() {
2360
- if (Er) return mt;
2361
- Er = 1;
2362
- var e;
2363
- function t(S, A, T) {
2364
- return A = r(A), A in S ? Object.defineProperty(S, A, { value: T, enumerable: !0, configurable: !0, writable: !0 }) : S[A] = T, S;
2365
- }
2366
- function r(S) {
2367
- var A = o(S, "string");
2368
- return typeof A == "symbol" ? A : String(A);
2369
- }
2370
- function o(S, A) {
2371
- if (typeof S != "object" || S === null) return S;
2372
- var T = S[Symbol.toPrimitive];
2373
- if (T !== void 0) {
2374
- var C = T.call(S, A);
2375
- if (typeof C != "object") return C;
2376
- throw new TypeError("@@toPrimitive must return a primitive value.");
2377
- }
2378
- return (A === "string" ? String : Number)(S);
2379
- }
2380
- var a = yn, d = Symbol("lastResolve"), c = Symbol("lastReject"), m = Symbol("error"), y = Symbol("ended"), E = Symbol("lastPromise"), L = Symbol("handlePromise"), N = Symbol("stream");
2381
- function D(S, A) {
2382
- return {
2383
- value: S,
2384
- done: A
2385
- };
2386
- }
2387
- function x(S) {
2388
- var A = S[d];
2389
- if (A !== null) {
2390
- var T = S[N].read();
2391
- T !== null && (S[E] = null, S[d] = null, S[c] = null, A(D(T, !1)));
2392
- }
2393
- }
2394
- function P(S) {
2395
- U.nextTick(x, S);
2396
- }
2397
- function M(S, A) {
2398
- return function(T, C) {
2399
- S.then(function() {
2400
- if (A[y]) {
2401
- T(D(void 0, !0));
2402
- return;
2403
- }
2404
- A[L](T, C);
2405
- }, C);
2406
- };
2407
- }
2408
- var R = Object.getPrototypeOf(function() {
2409
- }), u = Object.setPrototypeOf((e = {
2410
- get stream() {
2411
- return this[N];
2412
- },
2413
- next: function() {
2414
- var A = this, T = this[m];
2415
- if (T !== null)
2416
- return Promise.reject(T);
2417
- if (this[y])
2418
- return Promise.resolve(D(void 0, !0));
2419
- if (this[N].destroyed)
2420
- return new Promise(function(I, z) {
2421
- U.nextTick(function() {
2422
- A[m] ? z(A[m]) : I(D(void 0, !0));
2423
- });
2424
- });
2425
- var C = this[E], W;
2426
- if (C)
2427
- W = new Promise(M(C, this));
2428
- else {
2429
- var F = this[N].read();
2430
- if (F !== null)
2431
- return Promise.resolve(D(F, !1));
2432
- W = new Promise(this[L]);
2433
- }
2434
- return this[E] = W, W;
2435
- }
2436
- }, t(e, Symbol.asyncIterator, function() {
2437
- return this;
2438
- }), t(e, "return", function() {
2439
- var A = this;
2440
- return new Promise(function(T, C) {
2441
- A[N].destroy(null, function(W) {
2442
- if (W) {
2443
- C(W);
2444
- return;
2445
- }
2446
- T(D(void 0, !0));
2447
- });
2448
- });
2449
- }), e), R), b = function(A) {
2450
- var T, C = Object.create(u, (T = {}, t(T, N, {
2451
- value: A,
2452
- writable: !0
2453
- }), t(T, d, {
2454
- value: null,
2455
- writable: !0
2456
- }), t(T, c, {
2457
- value: null,
2458
- writable: !0
2459
- }), t(T, m, {
2460
- value: null,
2461
- writable: !0
2462
- }), t(T, y, {
2463
- value: A._readableState.endEmitted,
2464
- writable: !0
2465
- }), t(T, L, {
2466
- value: function(F, I) {
2467
- var z = C[N].read();
2468
- z ? (C[E] = null, C[d] = null, C[c] = null, F(D(z, !1))) : (C[d] = F, C[c] = I);
2469
- },
2470
- writable: !0
2471
- }), T));
2472
- return C[E] = null, a(A, function(W) {
2473
- if (W && W.code !== "ERR_STREAM_PREMATURE_CLOSE") {
2474
- var F = C[c];
2475
- F !== null && (C[E] = null, C[d] = null, C[c] = null, F(W)), C[m] = W;
2476
- return;
2477
- }
2478
- var I = C[d];
2479
- I !== null && (C[E] = null, C[d] = null, C[c] = null, I(D(void 0, !0))), C[y] = !0;
2480
- }), A.on("readable", P.bind(null, C)), C;
2481
- };
2482
- return mt = b, mt;
2483
- }
2484
- var _t, Ar;
2485
- function ia() {
2486
- return Ar || (Ar = 1, _t = function() {
2487
- throw new Error("Readable.from is not available in the browser");
2488
- }), _t;
2489
- }
2490
- var St, Rr;
2491
- function oa() {
2492
- if (Rr) return St;
2493
- Rr = 1, St = I;
2494
- var e;
2495
- I.ReadableState = F, Fr.EventEmitter;
2496
- var t = function(i, v) {
2497
- return i.listeners(v).length;
2498
- }, r = $r, o = Ve.Buffer, a = (typeof ue < "u" ? ue : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
2499
- };
2500
- function d(n) {
2501
- return o.from(n);
2502
- }
2503
- function c(n) {
2504
- return o.isBuffer(n) || n instanceof a;
2505
- }
2506
- var m = Dt, y;
2507
- m && m.debuglog ? y = m.debuglog("stream") : y = function() {
2508
- };
2509
- var E = Uo(), L = sn, N = dn, D = N.getHighWaterMark, x = se.codes, P = x.ERR_INVALID_ARG_TYPE, M = x.ERR_STREAM_PUSH_AFTER_EOF, R = x.ERR_METHOD_NOT_IMPLEMENTED, u = x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, b, S, A;
2510
- me(I, r);
2511
- var T = L.errorOrDestroy, C = ["error", "close", "destroy", "pause", "resume"];
2512
- function W(n, i, v) {
2513
- if (typeof n.prependListener == "function") return n.prependListener(i, v);
2514
- !n._events || !n._events[i] ? n.on(i, v) : Array.isArray(n._events[i]) ? n._events[i].unshift(v) : n._events[i] = [v, n._events[i]];
2515
- }
2516
- function F(n, i, v) {
2517
- e = e || Ae(), n = n || {}, typeof v != "boolean" && (v = i instanceof e), this.objectMode = !!n.objectMode, v && (this.objectMode = this.objectMode || !!n.readableObjectMode), this.highWaterMark = D(this, n, "readableHighWaterMark", v), this.buffer = new E(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = n.emitClose !== !1, this.autoDestroy = !!n.autoDestroy, this.destroyed = !1, this.defaultEncoding = n.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, n.encoding && (b || (b = _r().StringDecoder), this.decoder = new b(n.encoding), this.encoding = n.encoding);
2518
- }
2519
- function I(n) {
2520
- if (e = e || Ae(), !(this instanceof I)) return new I(n);
2521
- var i = this instanceof e;
2522
- this._readableState = new F(n, this, i), this.readable = !0, n && (typeof n.read == "function" && (this._read = n.read), typeof n.destroy == "function" && (this._destroy = n.destroy)), r.call(this);
2523
- }
2524
- Object.defineProperty(I.prototype, "destroyed", {
2525
- // making it explicit this property is not enumerable
2526
- // because otherwise some prototype manipulation in
2527
- // userland will fail
2528
- enumerable: !1,
2529
- get: function() {
2530
- return this._readableState === void 0 ? !1 : this._readableState.destroyed;
2531
- },
2532
- set: function(i) {
2533
- this._readableState && (this._readableState.destroyed = i);
2534
- }
2535
- }), I.prototype.destroy = L.destroy, I.prototype._undestroy = L.undestroy, I.prototype._destroy = function(n, i) {
2536
- i(n);
2537
- }, I.prototype.push = function(n, i) {
2538
- var v = this._readableState, O;
2539
- return v.objectMode ? O = !0 : typeof n == "string" && (i = i || v.defaultEncoding, i !== v.encoding && (n = o.from(n, i), i = ""), O = !0), z(this, n, i, !1, O);
2540
- }, I.prototype.unshift = function(n) {
2541
- return z(this, n, null, !0, !1);
2542
- };
2543
- function z(n, i, v, O, H) {
2544
- y("readableAddChunk", i);
2545
- var $ = n._readableState;
2546
- if (i === null)
2547
- $.reading = !1, ie(n, $);
2548
- else {
2549
- var q;
2550
- if (H || (q = Y($, i)), q)
2551
- T(n, q);
2552
- else if ($.objectMode || i && i.length > 0)
2553
- if (typeof i != "string" && !$.objectMode && Object.getPrototypeOf(i) !== o.prototype && (i = d(i)), O)
2554
- $.endEmitted ? T(n, new u()) : J(n, $, i, !0);
2555
- else if ($.ended)
2556
- T(n, new M());
2557
- else {
2558
- if ($.destroyed)
2559
- return !1;
2560
- $.reading = !1, $.decoder && !v ? (i = $.decoder.write(i), $.objectMode || i.length !== 0 ? J(n, $, i, !1) : K(n, $)) : J(n, $, i, !1);
2561
- }
2562
- else O || ($.reading = !1, K(n, $));
2563
- }
2564
- return !$.ended && ($.length < $.highWaterMark || $.length === 0);
2565
- }
2566
- function J(n, i, v, O) {
2567
- i.flowing && i.length === 0 && !i.sync ? (i.awaitDrain = 0, n.emit("data", v)) : (i.length += i.objectMode ? 1 : v.length, O ? i.buffer.unshift(v) : i.buffer.push(v), i.needReadable && Q(n)), K(n, i);
2568
- }
2569
- function Y(n, i) {
2570
- var v;
2571
- return !c(i) && typeof i != "string" && i !== void 0 && !n.objectMode && (v = new P("chunk", ["string", "Buffer", "Uint8Array"], i)), v;
2572
- }
2573
- I.prototype.isPaused = function() {
2574
- return this._readableState.flowing === !1;
2575
- }, I.prototype.setEncoding = function(n) {
2576
- b || (b = _r().StringDecoder);
2577
- var i = new b(n);
2578
- this._readableState.decoder = i, this._readableState.encoding = this._readableState.decoder.encoding;
2579
- for (var v = this._readableState.buffer.head, O = ""; v !== null; )
2580
- O += i.write(v.data), v = v.next;
2581
- return this._readableState.buffer.clear(), O !== "" && this._readableState.buffer.push(O), this._readableState.length = O.length, this;
2582
- };
2583
- var re = 1073741824;
2584
- function Z(n) {
2585
- return n >= re ? n = re : (n--, n |= n >>> 1, n |= n >>> 2, n |= n >>> 4, n |= n >>> 8, n |= n >>> 16, n++), n;
2586
- }
2587
- function ne(n, i) {
2588
- return n <= 0 || i.length === 0 && i.ended ? 0 : i.objectMode ? 1 : n !== n ? i.flowing && i.length ? i.buffer.head.data.length : i.length : (n > i.highWaterMark && (i.highWaterMark = Z(n)), n <= i.length ? n : i.ended ? i.length : (i.needReadable = !0, 0));
2589
- }
2590
- I.prototype.read = function(n) {
2591
- y("read", n), n = parseInt(n, 10);
2592
- var i = this._readableState, v = n;
2593
- if (n !== 0 && (i.emittedReadable = !1), n === 0 && i.needReadable && ((i.highWaterMark !== 0 ? i.length >= i.highWaterMark : i.length > 0) || i.ended))
2594
- return y("read: emitReadable", i.length, i.ended), i.length === 0 && i.ended ? p(this) : Q(this), null;
2595
- if (n = ne(n, i), n === 0 && i.ended)
2596
- return i.length === 0 && p(this), null;
2597
- var O = i.needReadable;
2598
- y("need readable", O), (i.length === 0 || i.length - n < i.highWaterMark) && (O = !0, y("length less than watermark", O)), i.ended || i.reading ? (O = !1, y("reading or ended", O)) : O && (y("do read"), i.reading = !0, i.sync = !0, i.length === 0 && (i.needReadable = !0), this._read(i.highWaterMark), i.sync = !1, i.reading || (n = ne(v, i)));
2599
- var H;
2600
- return n > 0 ? H = f(n, i) : H = null, H === null ? (i.needReadable = i.length <= i.highWaterMark, n = 0) : (i.length -= n, i.awaitDrain = 0), i.length === 0 && (i.ended || (i.needReadable = !0), v !== n && i.ended && p(this)), H !== null && this.emit("data", H), H;
2601
- };
2602
- function ie(n, i) {
2603
- if (y("onEofChunk"), !i.ended) {
2604
- if (i.decoder) {
2605
- var v = i.decoder.end();
2606
- v && v.length && (i.buffer.push(v), i.length += i.objectMode ? 1 : v.length);
2607
- }
2608
- i.ended = !0, i.sync ? Q(n) : (i.needReadable = !1, i.emittedReadable || (i.emittedReadable = !0, ee(n)));
2609
- }
2610
- }
2611
- function Q(n) {
2612
- var i = n._readableState;
2613
- y("emitReadable", i.needReadable, i.emittedReadable), i.needReadable = !1, i.emittedReadable || (y("emitReadable", i.flowing), i.emittedReadable = !0, U.nextTick(ee, n));
2614
- }
2615
- function ee(n) {
2616
- var i = n._readableState;
2617
- y("emitReadable_", i.destroyed, i.length, i.ended), !i.destroyed && (i.length || i.ended) && (n.emit("readable"), i.emittedReadable = !1), i.needReadable = !i.flowing && !i.ended && i.length <= i.highWaterMark, l(n);
2618
- }
2619
- function K(n, i) {
2620
- i.readingMore || (i.readingMore = !0, U.nextTick(te, n, i));
2621
- }
2622
- function te(n, i) {
2623
- for (; !i.reading && !i.ended && (i.length < i.highWaterMark || i.flowing && i.length === 0); ) {
2624
- var v = i.length;
2625
- if (y("maybeReadMore read 0"), n.read(0), v === i.length)
2626
- break;
2627
- }
2628
- i.readingMore = !1;
2629
- }
2630
- I.prototype._read = function(n) {
2631
- T(this, new R("_read()"));
2632
- }, I.prototype.pipe = function(n, i) {
2633
- var v = this, O = this._readableState;
2634
- switch (O.pipesCount) {
2635
- case 0:
2636
- O.pipes = n;
2637
- break;
2638
- case 1:
2639
- O.pipes = [O.pipes, n];
2640
- break;
2641
- default:
2642
- O.pipes.push(n);
2643
- break;
2644
- }
2645
- O.pipesCount += 1, y("pipe count=%d opts=%j", O.pipesCount, i);
2646
- var H = (!i || i.end !== !1) && n !== U.stdout && n !== U.stderr, $ = H ? fe : Se;
2647
- O.endEmitted ? U.nextTick($) : v.once("end", $), n.on("unpipe", q);
2648
- function q(ce, de) {
2649
- y("onunpipe"), ce === v && de && de.hasUnpiped === !1 && (de.hasUnpiped = !0, Wt());
2650
- }
2651
- function fe() {
2652
- y("onend"), n.end();
2653
- }
2654
- var g = ae(v);
2655
- n.on("drain", g);
2656
- var Le = !1;
2657
- function Wt() {
2658
- y("cleanup"), n.removeListener("close", Qe), n.removeListener("finish", et), n.removeListener("drain", g), n.removeListener("error", Xe), n.removeListener("unpipe", q), v.removeListener("end", fe), v.removeListener("end", Se), v.removeListener("data", xt), Le = !0, O.awaitDrain && (!n._writableState || n._writableState.needDrain) && g();
2659
- }
2660
- v.on("data", xt);
2661
- function xt(ce) {
2662
- y("ondata");
2663
- var de = n.write(ce);
2664
- y("dest.write", de), de === !1 && ((O.pipesCount === 1 && O.pipes === n || O.pipesCount > 1 && j(O.pipes, n) !== -1) && !Le && (y("false write response, pause", O.awaitDrain), O.awaitDrain++), v.pause());
2665
- }
2666
- function Xe(ce) {
2667
- y("onerror", ce), Se(), n.removeListener("error", Xe), t(n, "error") === 0 && T(n, ce);
2668
- }
2669
- W(n, "error", Xe);
2670
- function Qe() {
2671
- n.removeListener("finish", et), Se();
2672
- }
2673
- n.once("close", Qe);
2674
- function et() {
2675
- y("onfinish"), n.removeListener("close", Qe), Se();
2676
- }
2677
- n.once("finish", et);
2678
- function Se() {
2679
- y("unpipe"), v.unpipe(n);
2680
- }
2681
- return n.emit("pipe", v), O.flowing || (y("pipe resume"), v.resume()), n;
2682
- };
2683
- function ae(n) {
2684
- return function() {
2685
- var v = n._readableState;
2686
- y("pipeOnDrain", v.awaitDrain), v.awaitDrain && v.awaitDrain--, v.awaitDrain === 0 && t(n, "data") && (v.flowing = !0, l(n));
2687
- };
2688
- }
2689
- I.prototype.unpipe = function(n) {
2690
- var i = this._readableState, v = {
2691
- hasUnpiped: !1
2692
- };
2693
- if (i.pipesCount === 0) return this;
2694
- if (i.pipesCount === 1)
2695
- return n && n !== i.pipes ? this : (n || (n = i.pipes), i.pipes = null, i.pipesCount = 0, i.flowing = !1, n && n.emit("unpipe", this, v), this);
2696
- if (!n) {
2697
- var O = i.pipes, H = i.pipesCount;
2698
- i.pipes = null, i.pipesCount = 0, i.flowing = !1;
2699
- for (var $ = 0; $ < H; $++) O[$].emit("unpipe", this, {
2700
- hasUnpiped: !1
2701
- });
2702
- return this;
2703
- }
2704
- var q = j(i.pipes, n);
2705
- return q === -1 ? this : (i.pipes.splice(q, 1), i.pipesCount -= 1, i.pipesCount === 1 && (i.pipes = i.pipes[0]), n.emit("unpipe", this, v), this);
2706
- }, I.prototype.on = function(n, i) {
2707
- var v = r.prototype.on.call(this, n, i), O = this._readableState;
2708
- return n === "data" ? (O.readableListening = this.listenerCount("readable") > 0, O.flowing !== !1 && this.resume()) : n === "readable" && !O.endEmitted && !O.readableListening && (O.readableListening = O.needReadable = !0, O.flowing = !1, O.emittedReadable = !1, y("on readable", O.length, O.reading), O.length ? Q(this) : O.reading || U.nextTick(h, this)), v;
2709
- }, I.prototype.addListener = I.prototype.on, I.prototype.removeListener = function(n, i) {
2710
- var v = r.prototype.removeListener.call(this, n, i);
2711
- return n === "readable" && U.nextTick(s, this), v;
2712
- }, I.prototype.removeAllListeners = function(n) {
2713
- var i = r.prototype.removeAllListeners.apply(this, arguments);
2714
- return (n === "readable" || n === void 0) && U.nextTick(s, this), i;
2715
- };
2716
- function s(n) {
2717
- var i = n._readableState;
2718
- i.readableListening = n.listenerCount("readable") > 0, i.resumeScheduled && !i.paused ? i.flowing = !0 : n.listenerCount("data") > 0 && n.resume();
2719
- }
2720
- function h(n) {
2721
- y("readable nexttick read 0"), n.read(0);
2722
- }
2723
- I.prototype.resume = function() {
2724
- var n = this._readableState;
2725
- return n.flowing || (y("resume"), n.flowing = !n.readableListening, w(this, n)), n.paused = !1, this;
2726
- };
2727
- function w(n, i) {
2728
- i.resumeScheduled || (i.resumeScheduled = !0, U.nextTick(B, n, i));
2729
- }
2730
- function B(n, i) {
2731
- y("resume", i.reading), i.reading || n.read(0), i.resumeScheduled = !1, n.emit("resume"), l(n), i.flowing && !i.reading && n.read(0);
2732
- }
2733
- I.prototype.pause = function() {
2734
- return y("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (y("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
2735
- };
2736
- function l(n) {
2737
- var i = n._readableState;
2738
- for (y("flow", i.flowing); i.flowing && n.read() !== null; ) ;
2739
- }
2740
- I.prototype.wrap = function(n) {
2741
- var i = this, v = this._readableState, O = !1;
2742
- n.on("end", function() {
2743
- if (y("wrapped end"), v.decoder && !v.ended) {
2744
- var q = v.decoder.end();
2745
- q && q.length && i.push(q);
2746
- }
2747
- i.push(null);
2748
- }), n.on("data", function(q) {
2749
- if (y("wrapped data"), v.decoder && (q = v.decoder.write(q)), !(v.objectMode && q == null) && !(!v.objectMode && (!q || !q.length))) {
2750
- var fe = i.push(q);
2751
- fe || (O = !0, n.pause());
2752
- }
2753
- });
2754
- for (var H in n)
2755
- this[H] === void 0 && typeof n[H] == "function" && (this[H] = /* @__PURE__ */ function(fe) {
2756
- return function() {
2757
- return n[fe].apply(n, arguments);
2758
- };
2759
- }(H));
2760
- for (var $ = 0; $ < C.length; $++)
2761
- n.on(C[$], this.emit.bind(this, C[$]));
2762
- return this._read = function(q) {
2763
- y("wrapped _read", q), O && (O = !1, n.resume());
2764
- }, this;
2765
- }, typeof Symbol == "function" && (I.prototype[Symbol.asyncIterator] = function() {
2766
- return S === void 0 && (S = na()), S(this);
2767
- }), Object.defineProperty(I.prototype, "readableHighWaterMark", {
2768
- // making it explicit this property is not enumerable
2769
- // because otherwise some prototype manipulation in
2770
- // userland will fail
2771
- enumerable: !1,
2772
- get: function() {
2773
- return this._readableState.highWaterMark;
2774
- }
2775
- }), Object.defineProperty(I.prototype, "readableBuffer", {
2776
- // making it explicit this property is not enumerable
2777
- // because otherwise some prototype manipulation in
2778
- // userland will fail
2779
- enumerable: !1,
2780
- get: function() {
2781
- return this._readableState && this._readableState.buffer;
2782
- }
2783
- }), Object.defineProperty(I.prototype, "readableFlowing", {
2784
- // making it explicit this property is not enumerable
2785
- // because otherwise some prototype manipulation in
2786
- // userland will fail
2787
- enumerable: !1,
2788
- get: function() {
2789
- return this._readableState.flowing;
2790
- },
2791
- set: function(i) {
2792
- this._readableState && (this._readableState.flowing = i);
2793
- }
2794
- }), I._fromList = f, Object.defineProperty(I.prototype, "readableLength", {
2795
- // making it explicit this property is not enumerable
2796
- // because otherwise some prototype manipulation in
2797
- // userland will fail
2798
- enumerable: !1,
2799
- get: function() {
2800
- return this._readableState.length;
2801
- }
2802
- });
2803
- function f(n, i) {
2804
- if (i.length === 0) return null;
2805
- var v;
2806
- return i.objectMode ? v = i.buffer.shift() : !n || n >= i.length ? (i.decoder ? v = i.buffer.join("") : i.buffer.length === 1 ? v = i.buffer.first() : v = i.buffer.concat(i.length), i.buffer.clear()) : v = i.buffer.consume(n, i.decoder), v;
2807
- }
2808
- function p(n) {
2809
- var i = n._readableState;
2810
- y("endReadable", i.endEmitted), i.endEmitted || (i.ended = !0, U.nextTick(_, i, n));
2811
- }
2812
- function _(n, i) {
2813
- if (y("endReadableNT", n.endEmitted, n.length), !n.endEmitted && n.length === 0 && (n.endEmitted = !0, i.readable = !1, i.emit("end"), n.autoDestroy)) {
2814
- var v = i._writableState;
2815
- (!v || v.autoDestroy && v.finished) && i.destroy();
2816
- }
2817
- }
2818
- typeof Symbol == "function" && (I.from = function(n, i) {
2819
- return A === void 0 && (A = ia()), A(I, n, i);
2820
- });
2821
- function j(n, i) {
2822
- for (var v = 0, O = n.length; v < O; v++)
2823
- if (n[v] === i) return v;
2824
- return -1;
2825
- }
2826
- return St;
2827
- }
2828
- var aa = oe, Ye = se.codes, fa = Ye.ERR_METHOD_NOT_IMPLEMENTED, ua = Ye.ERR_MULTIPLE_CALLBACK, la = Ye.ERR_TRANSFORM_ALREADY_TRANSFORMING, sa = Ye.ERR_TRANSFORM_WITH_LENGTH_0, Ze = Ae();
2829
- me(oe, Ze);
2830
- function ca(e, t) {
2831
- var r = this._transformState;
2832
- r.transforming = !1;
2833
- var o = r.writecb;
2834
- if (o === null)
2835
- return this.emit("error", new ua());
2836
- r.writechunk = null, r.writecb = null, t != null && this.push(t), o(e);
2837
- var a = this._readableState;
2838
- a.reading = !1, (a.needReadable || a.length < a.highWaterMark) && this._read(a.highWaterMark);
2839
- }
2840
- function oe(e) {
2841
- if (!(this instanceof oe)) return new oe(e);
2842
- Ze.call(this, e), this._transformState = {
2843
- afterTransform: ca.bind(this),
2844
- needTransform: !1,
2845
- transforming: !1,
2846
- writecb: null,
2847
- writechunk: null,
2848
- writeencoding: null
2849
- }, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish", da);
2850
- }
2851
- function da() {
2852
- var e = this;
2853
- typeof this._flush == "function" && !this._readableState.destroyed ? this._flush(function(t, r) {
2854
- Or(e, t, r);
2855
- }) : Or(this, null, null);
2856
- }
2857
- oe.prototype.push = function(e, t) {
2858
- return this._transformState.needTransform = !1, Ze.prototype.push.call(this, e, t);
2859
- };
2860
- oe.prototype._transform = function(e, t, r) {
2861
- r(new fa("_transform()"));
2862
- };
2863
- oe.prototype._write = function(e, t, r) {
2864
- var o = this._transformState;
2865
- if (o.writecb = r, o.writechunk = e, o.writeencoding = t, !o.transforming) {
2866
- var a = this._readableState;
2867
- (o.needTransform || a.needReadable || a.length < a.highWaterMark) && this._read(a.highWaterMark);
2868
- }
2869
- };
2870
- oe.prototype._read = function(e) {
2871
- var t = this._transformState;
2872
- t.writechunk !== null && !t.transforming ? (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)) : t.needTransform = !0;
2873
- };
2874
- oe.prototype._destroy = function(e, t) {
2875
- Ze.prototype._destroy.call(this, e, function(r) {
2876
- t(r);
2877
- });
2878
- };
2879
- function Or(e, t, r) {
2880
- if (t) return e.emit("error", t);
2881
- if (r != null && e.push(r), e._writableState.length) throw new sa();
2882
- if (e._transformState.transforming) throw new la();
2883
- return e.push(null);
2884
- }
2885
- var Ea = Re, hn = aa;
2886
- me(Re, hn);
2887
- function Re(e) {
2888
- if (!(this instanceof Re)) return new Re(e);
2889
- hn.call(this, e);
2890
- }
2891
- Re.prototype._transform = function(e, t, r) {
2892
- r(null, e);
2893
- };
2894
- var Et;
2895
- function pa(e) {
2896
- var t = !1;
2897
- return function() {
2898
- t || (t = !0, e.apply(void 0, arguments));
2899
- };
2900
- }
2901
- var gn = se.codes, ya = gn.ERR_MISSING_ARGS, ha = gn.ERR_STREAM_DESTROYED;
2902
- function Pr(e) {
2903
- if (e) throw e;
2904
- }
2905
- function ga(e) {
2906
- return e.setHeader && typeof e.abort == "function";
2907
- }
2908
- function va(e, t, r, o) {
2909
- o = pa(o);
2910
- var a = !1;
2911
- e.on("close", function() {
2912
- a = !0;
2913
- }), Et === void 0 && (Et = yn), Et(e, {
2914
- readable: t,
2915
- writable: r
2916
- }, function(c) {
2917
- if (c) return o(c);
2918
- a = !0, o();
2919
- });
2920
- var d = !1;
2921
- return function(c) {
2922
- if (!a && !d) {
2923
- if (d = !0, ga(e)) return e.abort();
2924
- if (typeof e.destroy == "function") return e.destroy();
2925
- o(c || new ha("pipe"));
2926
- }
2927
- };
2928
- }
2929
- function Tr(e) {
2930
- e();
2931
- }
2932
- function ba(e, t) {
2933
- return e.pipe(t);
2934
- }
2935
- function wa(e) {
2936
- return !e.length || typeof e[e.length - 1] != "function" ? Pr : e.pop();
2937
- }
2938
- function ma() {
2939
- for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
2940
- t[r] = arguments[r];
2941
- var o = wa(t);
2942
- if (Array.isArray(t[0]) && (t = t[0]), t.length < 2)
2943
- throw new ya("streams");
2944
- var a, d = t.map(function(c, m) {
2945
- var y = m < t.length - 1, E = m > 0;
2946
- return va(c, y, E, function(L) {
2947
- a || (a = L), L && d.forEach(Tr), !y && (d.forEach(Tr), o(a));
2948
- });
2949
- });
2950
- return t.reduce(ba);
2951
- }
2952
- var Aa = ma;
2953
- export {
2954
- aa as _,
2955
- Xo as a,
2956
- Ae as b,
2957
- Ea as c,
2958
- Me as d,
2959
- yn as e,
2960
- Zr as g,
2961
- me as i,
2962
- Aa as p,
2963
- oa as r,
2964
- Oe as t
2965
- };